Rewrite OatFileManager::OpenDexFilesFromOat.

- Remove obsolete option -Xno-dex-file-fallback
- Only load an oat file when class loader context matches.
- Remove obsolete duplicate class check code.

Bug: 132357300
Bug: 156250899
Change-Id: I78e645806e0de2f35ce2614285f1a7cbc705484c
diff --git a/runtime/oat_file_assistant.h b/runtime/oat_file_assistant.h
index aa4d83b..069e6fa 100644
--- a/runtime/oat_file_assistant.h
+++ b/runtime/oat_file_assistant.h
@@ -200,11 +200,8 @@
                            const std::string& dex_location,
                            std::vector<std::unique_ptr<const DexFile>>* out_dex_files);
 
-  // Returns true if there are dex files in the original dex location that can
-  // be compiled with dex2oat for this dex location.
-  // Returns false if there is no original dex file, or if the original dex
-  // file is an apk/zip without a classes.dex entry.
-  bool HasOriginalDexFiles();
+  // Returns whether this is an apk/zip wit a classes.dex entry.
+  bool HasDexFiles();
 
   // If the dex file has been installed with a compiled oat file alongside
   // it, the compiled oat file will have the extension .odex, and is referred