Synchronize JNI critical calls with the CC collector thread flip.

JNI critical calls (like GetArrayElementsCritical) would need to block
for the whole GC run to finish if the CC collector GC is ongoing. This
CL changes it so that they don't need to block for the GC run, but
only for the duration of the thread flip operation, which is much
shorter. This is valid due to the to-space invariant.

Bug: 12687968
Bug: 19235243

Change-Id: I1b6b4ae4fa539ddc0ec50b10ae8c8709f2a12fe8
diff --git a/runtime/debugger.cc b/runtime/debugger.cc
index 0cbbb79..67099d7 100644
--- a/runtime/debugger.cc
+++ b/runtime/debugger.cc
@@ -2094,6 +2094,7 @@
     case kWaitingInMainSignalCatcherLoop:
     case kWaitingPerformingGc:
     case kWaitingWeakGcRootRead:
+    case kWaitingForGcThreadFlip:
     case kWaiting:
       return JDWP::TS_WAIT;
       // Don't add a 'default' here so the compiler can spot incompatible enum changes.