Fix debugger deadlock.

Fixes a deadlock between the event thread lock and the processing request
lock where the JDWP thread and the event thread wait for each other. We now
move the call to StartProcessingRequest after the call to SetWaitForEventThread
in JdwpState::ProcessRequest so locks are taken in the same order in both
threads.

Also adds some thread safety annotations and JDWP verbose logs for debug (only
enabled if we pass the -verbose:jdwp option to the runtime).

Bug: 13165103
Change-Id: I4e8b6526d973bfee56e69e8e14eddf56adfa1939
diff --git a/runtime/jdwp/jdwp_main.cc b/runtime/jdwp/jdwp_main.cc
index ba49c45..500585d 100644
--- a/runtime/jdwp/jdwp_main.cc
+++ b/runtime/jdwp/jdwp_main.cc
@@ -386,10 +386,14 @@
   JdwpNetStateBase* netStateBase = reinterpret_cast<JdwpNetStateBase*>(netState);
   JDWP::Request request(netStateBase->input_buffer_, netStateBase->input_count_);
 
-  StartProcessingRequest();
   ExpandBuf* pReply = expandBufAlloc();
   ProcessRequest(request, pReply);
   ssize_t cc = netStateBase->WritePacket(pReply);
+
+  /*
+   * We processed this request and sent its reply. Notify other threads waiting for us they can now
+   * send events.
+   */
   EndProcessingRequest();
 
   if (cc != (ssize_t) expandBufGetLength(pReply)) {