Obtain stack trace outside of critical section

Fixes deadlock if the stack walk does allocations, changed stack
trace format to prevent slowdown.

Added missing GetInterfaceMethodIfProxy to fix a crash in maps.

Bug: 27857910

(cherry picked from commit 23428587d32361736d4c5e0ba7270c7602695a43)

Change-Id: I64373bcd87a68fdd1b58fb855db2b16c9f6ed36b
diff --git a/runtime/hprof/hprof.cc b/runtime/hprof/hprof.cc
index bb35ec7..3885c60 100644
--- a/runtime/hprof/hprof.cc
+++ b/runtime/hprof/hprof.cc
@@ -828,7 +828,7 @@
         continue;
       }
       ++count;
-      const gc::AllocRecordStackTrace* trace = it->second->GetStackTrace();
+      const gc::AllocRecordStackTrace* trace = it->second.GetStackTrace();
 
       // Copy the pair into a real hash map to speed up look up.
       auto records_result = allocation_records_.emplace(obj, trace);