Replace mbedcrypto dependency with Mbed TLS

Mbedcrypto as a separate project is deprecated, it was merged back to
Mbed TLS. This commit updates the external dependency to use Mbed TLS.
Since the current version of Mbed TLS uses the PSA Crypto API v1.0.0,
the commit also makes the necessary changes to get in sync with this.

Mbed TLS is capable of building three different libraries, but we only
need libmbedcrypto.a out of these. An extra step is added to configure
Mbed TLS to only produce this one, to shorten the build time.

Mbed TLS provides a method to override the necessary options of its
built-in default config, instead of providing a complete customized
config file. This makes the config easier to read, since only those
options are captured where we want to differ from the default. The
current full config file is removed and replaced using this format.

The changes introduced to get compatible with PSA Crypto API v1.0.0:

* The psa_open_key() and psa_close_key() functions were removed from the
  API specification, remove all references from the code.

* The key identifier and key handle concepts were merged in the API,
  replace all uses of psa_key_handle_t with psa_key_id_t.

* Several internal implementation macros were removed from the API.
  Remove these from the code and replace with API macros where
  necessary.

* The PSA_ALG_xxx and PSA_KEY_USAGE_xxx macros have new values in the
  API, update the code to reflect these changes.

* The PSA_ECC_xxx and PSA_DH_xxx macros were renamed in the API. Update
  the code to reflect these changes.

Signed-off-by: Balint Dobszay <balint.dobszay@arm.com>
Change-Id: I4d721717d9ff33b6bac85cfcb482ea719bec1b31
59 files changed