tests: refactor grant tests

In preparation for adding more test cases

- use map_ks_error
- rename helpers for clarity
   - drop pointless keystore2_ prefix along the way
- assume SecLevel:tee when using granted key
- helper for building granted KeyDescriptor
- make test names clearer
   - in particular, mark which tests use SELINUX keys
- reduce casts
- add helper for getting granted key

Test: keystore2_client_tests grant
Change-Id: I659576afcaed96c4dcb2b03df035b98d207429fe
1 file changed