Fix keystore::del to use correct keymaster device.

Keystore uses two different keymaster devices.
One device is provided by the OEM providing
hardware/trust zone backed functionality. The other
is a pure software implementation of keymaster.
The latter was used when a "hardware" implementation
failed generating or importing keys with certain
parameters.

During the port to HIDL based HALs this fallback software
device was removed and later reinstated. The delete
function of keystore, however was left unaware of the
existence of the fallback device and passed do-be-deleted
"fallback"-keys to the hardware device which is unaware
of the format and fails.

This patch makes Keystore::del aware of the fallback
device.

Test: import and delete a key that is unsupported by the
      underlying "hardware" implementation of keymaster

Change-Id: I011c19c515b4b41fedec0c21f89efb58279f297c
diff --git a/keystore/keystore.cpp b/keystore/keystore.cpp
index 3fc9efc..2d9de5d 100644
--- a/keystore/keystore.cpp
+++ b/keystore/keystore.cpp
@@ -309,8 +309,10 @@
         return rc;
     }
 
+    auto& dev = getDevice(keyBlob);
+
     if (keyBlob.getType() == ::TYPE_KEY_PAIR || keyBlob.getType() == ::TYPE_KEYMASTER_10) {
-        auto ret = KS_HANDLE_HIDL_ERROR(mDevice->deleteKey(blob2hidlVec(keyBlob)));
+        auto ret = KS_HANDLE_HIDL_ERROR(dev->deleteKey(blob2hidlVec(keyBlob)));
 
         // A device doesn't have to implement delete_key.
         if (ret != ErrorCode::OK && ret != ErrorCode::UNIMPLEMENTED)