Implement slot allocation

Implement psa_allocate_key, psa_open_key, psa_create_key,
psa_close_key.

Add support for keys designated to handles to psa_get_key_slot, and
thereby to the whole API.

Allocated and non-allocated keys can coexist. This is a temporary
stage in order to transition from the use of direct slot numbers to
allocated handles only. Once all the tests and sample programs have
been migrated to use handles, the implementation will be simplified
and made more robust with support for handles only.
diff --git a/tests/suites/test_suite_psa_crypto.data b/tests/suites/test_suite_psa_crypto.data
index 91739f5..33ca54f 100644
--- a/tests/suites/test_suite_psa_crypto.data
+++ b/tests/suites/test_suite_psa_crypto.data
@@ -39,7 +39,10 @@
 export_invalid_slot:0:PSA_ERROR_INVALID_ARGUMENT
 
 PSA export out of range key slot - upper bound
-export_invalid_slot:(psa_key_slot_t)(-1):PSA_ERROR_INVALID_ARGUMENT
+# Hard-code the upper bound of slots that are directly accessible because the
+# API does not expose this value. This is temporary: directly-accessible
+# slots are about to be removed.
+export_invalid_slot:32767:PSA_ERROR_INVALID_ARGUMENT
 
 PSA export a slot where there was some activity but no key material creation
 export_with_no_key_activity