Change MethodHelper to use a Handle.

Added ConstHandle to help prevent errors where you modify the value
stored in the handle of the caller. Also fixed compaction bugs
related to not knowing MethodHelper::GetReturnType can resolve types.
This bug was present in interpreter RETURN_OBJECT.

Bug: 13077697

Change-Id: I71f964d4d810ab4debda1a09bc968af8f3c874a3
diff --git a/runtime/profiler.cc b/runtime/profiler.cc
index bad79b3..00bb501 100644
--- a/runtime/profiler.cc
+++ b/runtime/profiler.cc
@@ -378,8 +378,7 @@
 
   bool is_filtered = false;
 
-  MethodHelper mh(method);
-  if (strcmp(mh.GetName(), "<clinit>") == 0) {
+  if (strcmp(method->GetName(), "<clinit>") == 0) {
     // always filter out class init
     is_filtered = true;
   }
@@ -460,8 +459,7 @@
         mirror::ArtMethod *method = meth_iter.first;
         std::string method_name = PrettyMethod(method);
 
-        MethodHelper mh(method);
-        const DexFile::CodeItem* codeitem = mh.GetCodeItem();
+        const DexFile::CodeItem* codeitem = method->GetCodeItem();
         uint32_t method_size = 0;
         if (codeitem != nullptr) {
           method_size = codeitem->insns_size_in_code_units_;