keystore: fully reset user keystore on request

The reset was improperly skipping the .masterkey file which left
keystore in a "LOCKED" state next time it was started up. The .masterkey
should have been deleted to leave it in the requested "UNINITIALIZED"
state next time it started.

It looks like some logic was left over to check the UID to see if it
matches the current user. Currently there's no way to have a UID in
the user directory that doesn't match the current user.

Bug: 13886753
Change-Id: Icd3a1a55153a0dd28a26d51a5ae7f6de1a7da043
diff --git a/keystore/keystore.cpp b/keystore/keystore.cpp
index d8e4686..fd6af0d 100644
--- a/keystore/keystore.cpp
+++ b/keystore/keystore.cpp
@@ -842,19 +842,7 @@
             }
 
             // Skip anything that starts with a "."
-            if (file->d_name[0] == '.') {
-                continue;
-            }
-
-            // Find the current file's UID.
-            char* end;
-            unsigned long thisUid = strtoul(file->d_name, &end, 10);
-            if (end[0] != '_' || end[1] == 0) {
-                continue;
-            }
-
-            // Skip if this is not our user.
-            if (get_user_id(thisUid) != mUserId) {
+            if (file->d_name[0] == '.' && strcmp(".masterkey", file->d_name)) {
                 continue;
             }