Various fixes for JDWP.

- Moved lock of thread list lock into DecodeThread from its callers
- Fixed scope of various locks to prevent locking violations
- Added transition for current thread from runnable to suspended before
  suspending vm, and then a transition back
- Reworked lock ordering to allow JDWP locks to be held while grabbing
  the thread list lock
- Moved debugger PostException until after suspension is re-allowed

Change-Id: Ie53e47ff1538e6cd3125c48ddb4c13758b29be63
diff --git a/src/thread.h b/src/thread.h
index 7bd64c8..4d97315 100644
--- a/src/thread.h
+++ b/src/thread.h
@@ -128,9 +128,11 @@
   }
 
   static Thread* FromManagedThread(const ScopedObjectAccessUnchecked& ts, Object* thread_peer)
+      EXCLUSIVE_LOCKS_REQUIRED(Locks::thread_list_lock_)
       LOCKS_EXCLUDED(Locks::thread_suspend_count_lock_)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
   static Thread* FromManagedThread(const ScopedObjectAccessUnchecked& ts, jobject thread)
+      EXCLUSIVE_LOCKS_REQUIRED(Locks::thread_list_lock_)
       LOCKS_EXCLUDED(Locks::thread_suspend_count_lock_)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);