Add DexFileLoader class

Added DexFileLoader class, moved functionality from DexFile there:
- Multidex loading logic
- DexFile opening logic for Zip and etc
- Some other helpers

Bug: 63756964
Test: test-art-host

Change-Id: Ic3dfa458947d4b69912dea5cdd836e7e8f55061c
diff --git a/runtime/jit/jit_code_cache.cc b/runtime/jit/jit_code_cache.cc
index e122c6d..47615f5 100644
--- a/runtime/jit/jit_code_cache.cc
+++ b/runtime/jit/jit_code_cache.cc
@@ -26,6 +26,7 @@
 #include "base/time_utils.h"
 #include "cha.h"
 #include "debugger_interface.h"
+#include "dex_file_loader.h"
 #include "entrypoints/runtime_asm_entrypoints.h"
 #include "gc/accounting/bitmap-inl.h"
 #include "gc/scoped_gc_critical_section.h"
@@ -1350,7 +1351,8 @@
   for (const ProfilingInfo* info : profiling_infos_) {
     ArtMethod* method = info->GetMethod();
     const DexFile* dex_file = method->GetDexFile();
-    if (!ContainsElement(dex_base_locations, dex_file->GetBaseLocation())) {
+    const std::string base_location = DexFileLoader::GetBaseLocation(dex_file->GetLocation());
+    if (!ContainsElement(dex_base_locations, base_location)) {
       // Skip dex files which are not profiled.
       continue;
     }
@@ -1404,7 +1406,8 @@
           is_missing_types = true;
           continue;
         }
-        if (ContainsElement(dex_base_locations, class_dex_file->GetBaseLocation())) {
+        if (ContainsElement(dex_base_locations,
+                            DexFileLoader::GetBaseLocation(class_dex_file->GetLocation()))) {
           // Only consider classes from the same apk (including multidex).
           profile_classes.emplace_back(/*ProfileMethodInfo::ProfileClassReference*/
               class_dex_file, type_index);