Optimize engineGetEntry API to do less binder transactions

This reduces removes 3 binder transactions to keystore exist() call
in many common cases when retrieving keys and we base on the mutual
exclusion between certificates and keys the observed savings are
for some low end devices 7 ms on average per binder call so in total
21 ms on average when querying a key.

Bug: 216567905
Test: atest KeyStoreSpiTest
Test: Manual boot and normal behavior

Change-Id: I6dbbedfabf73f519a6bb5abb3d664b5375af0a31
1 file changed