Pass the debug_info_offset explicitly.

In order to use debug_info_offset for encoding implementation details,
rewrite all indirect users of it to fetch it before calling DexFile
methods.

This allows keeping the DexFile interface clean of runtime
considerations.

Test: test.py
Change-Id: I4591e0039b5f822f4409aae411071ecbe97082b1
diff --git a/runtime/oat_file.cc b/runtime/oat_file.cc
index 69bd46d..726fbd0 100644
--- a/runtime/oat_file.cc
+++ b/runtime/oat_file.cc
@@ -1455,6 +1455,14 @@
   }
 }
 
+uint32_t OatFile::GetDebugInfoOffset(const DexFile& dex_file ATTRIBUTE_UNUSED,
+                                     const DexFile::CodeItem* code_item) {
+  if (code_item == nullptr) {
+    return 0;
+  }
+  return code_item->debug_info_off_;
+}
+
 const OatFile::OatDexFile* OatFile::GetOatDexFile(const char* dex_location,
                                                   const uint32_t* dex_location_checksum,
                                                   std::string* error_msg) const {