Fix a heap lock/thread list lock deadlock.

We had an uncaught OOME whose uncaught exception handler -- running
with the thread lock held -- was trying to cause a GC while some
other thread had the heap lock and was waiting for the thread list
lock.

Change-Id: I22177129562268837127d9edcc63ef5e93054bdf
diff --git a/src/thread.h b/src/thread.h
index a7097ce..112a1ef 100644
--- a/src/thread.h
+++ b/src/thread.h
@@ -457,9 +457,15 @@
   void DumpState(std::ostream& os) const;
   void DumpStack(std::ostream& os) const;
 
+  // Out-of-line conveniences for debugging in gdb.
+  Thread* CurrentFromGdb() const; // Like Thread::Current.
+  void DumpFromGdb() const; // Like Thread::Dump(std::cerr).
+
   void Attach(const Runtime* runtime);
   static void* CreateCallback(void* arg);
 
+  void HandleUncaughtExceptions();
+
   void InitCpu();
   void InitFunctionPointers();
   void InitTid();