Implement asynchronous exception support

This CL implements async exception support in the switch interpreter.
It also adds support for the MTerp to detect and switch back to the
switch interpreter in cases where an async exception is detected.

Tests follow in next CL.

Test: ./test.py --host -j50

Bug: 62821960
Bug: 34415266

Change-Id: Idb53711a40c20f962de8aa6b74662676b8bd25c6
diff --git a/runtime/monitor.cc b/runtime/monitor.cc
index d85479a..7823413 100644
--- a/runtime/monitor.cc
+++ b/runtime/monitor.cc
@@ -1143,7 +1143,7 @@
   Handle<mirror::Object> h_obj(hs.NewHandle(obj));
 
   Runtime::Current()->GetRuntimeCallbacks()->ObjectWaitStart(h_obj, ms);
-  if (UNLIKELY(self->IsExceptionPending())) {
+  if (UNLIKELY(self->ObserveAsyncException() || self->IsExceptionPending())) {
     // See b/65558434 for information on handling of exceptions here.
     return;
   }