Refactor the use of Method by the compiler.

Remove the dependence on the Method object in dex2oat, allowing lazier
resolution.
Introduce new find and iterators in DexFile to simplify common
operations and avoid misuse of class data items.

Change-Id: I39fb8252190f543d89d8b233076355cec310fe08
diff --git a/src/utils.h b/src/utils.h
index f747ae8..f5e0c49 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -16,6 +16,7 @@
 namespace art {
 
 class Class;
+class DexFile;
 class Field;
 class Method;
 class Object;
@@ -166,6 +167,7 @@
 // Returns a human-readable signature for 'm'. Something like "a.b.C.m" or
 // "a.b.C.m(II)V" (depending on the value of 'with_signature').
 std::string PrettyMethod(const Method* m, bool with_signature = true);
+std::string PrettyMethod(uint32_t method_idx, const DexFile& dex_file, bool with_signature = true);
 
 // Returns a human-readable form of the name of the *class* of the given object.
 // So given an instance of java.lang.String, the output would