Fix deadlock in keystore

The keystore dispatcher thread must not hold any locks when it calls
LockedKeyBlobEntry::list.

Also fixed an issue with the KeyBlobEntry conparisson function that lead
to clients beeing blockd by each other if they edit the same alias at
the same time altough they have different name spaces.

Test: A script that is currently under development. Stay tuned
Change-Id: I1d7f46cc27b3d90305a0ea64b8859d85b42996d8
diff --git a/keystore/blob.h b/keystore/blob.h
index 5cd1b90..a7f9fd0 100644
--- a/keystore/blob.h
+++ b/keystore/blob.h
@@ -196,10 +196,10 @@
     bool hasCharacteristicsBlob() const;
 
     bool operator<(const KeyBlobEntry& rhs) const {
-        return std::tie(alias_, user_dir_, uid_) < std::tie(rhs.alias_, rhs.user_dir_, uid_);
+        return std::tie(uid_, alias_, user_dir_) < std::tie(rhs.uid_, rhs.alias_, rhs.user_dir_);
     }
     bool operator==(const KeyBlobEntry& rhs) const {
-        return std::tie(alias_, user_dir_, uid_) == std::tie(rhs.alias_, rhs.user_dir_, uid_);
+        return std::tie(uid_, alias_, user_dir_) == std::tie(rhs.uid_, rhs.alias_, rhs.user_dir_);
     }
     bool operator!=(const KeyBlobEntry& rhs) const { return !(*this == rhs); }