SPM: Improvements on connection handle creation and validation

This patch:

- Removes the duplicated 'client_id' in conn_handle_t as there
  is a 'cliend_id' in psa_msg_t struct already. 'client_id' will be
  populated by tfm_spm_fill_msg().

- Removes the 'magic' member in conn_handle_t as its validation
  can be covered by 'is_valid_chunk_data_in_pool()'.

- Simplifies the input args of handle creation and free API.

- Creates an API to get spm working handle from the client handle,
  it is an equivalent API of 'spm_get_handle_by_msg_handle()',
  which is used for partition APIs to get the spm working handle
  from message handle, and validates the partition id.

- Simplifies the check inside the handle validation API, moves the
  check of client id to the new API.

Change-Id: Ia81d868071f7ffe5a79fae97e12a67c56056e5bb
Signed-off-by: Kevin Peng <kevin.peng@arm.com>
Co-authored-by: Mingyang Sun <mingyang.sun@arm.com>
4 files changed