Revert "Change dex caches to be weak roots"

This reverts commit 3ae6b1d42523bb2a0ddb5edff1aaf05b592f28f4.
diff --git a/runtime/native/dalvik_system_DexFile.cc b/runtime/native/dalvik_system_DexFile.cc
index 9bd320c..4f97d20 100644
--- a/runtime/native/dalvik_system_DexFile.cc
+++ b/runtime/native/dalvik_system_DexFile.cc
@@ -171,7 +171,7 @@
     if (array == nullptr) {
       ScopedObjectAccess soa(env);
       for (auto& dex_file : dex_files) {
-        if (Runtime::Current()->GetClassLinker()->FindDexCache(*dex_file, true) != nullptr) {
+        if (Runtime::Current()->GetClassLinker()->IsDexFileRegistered(*dex_file)) {
           dex_file.release();
         }
       }
@@ -209,7 +209,7 @@
   // TODO: The Runtime should support unloading of classes and freeing of the
   // dex files for those unloaded classes rather than leaking dex files here.
   for (auto& dex_file : *dex_files) {
-    if (Runtime::Current()->GetClassLinker()->FindDexCache(*dex_file, true) == nullptr) {
+    if (!Runtime::Current()->GetClassLinker()->IsDexFileRegistered(*dex_file)) {
       delete dex_file;
     }
   }