Revert^2 "Perform SetEvent under the user_code_suspend_count_lock_"

If we needed to condition-wait for a gc to finish we would trigger an
overly restrictive deadlock check. This passed testing because
normally the Wait will not be executed. To prevent this type of issue
from occuring in the future we added a way for code to assert that
condition-waiting is allowed without actually going to sleep.

This reverts commit eaa4831142fa58f176ddad52c0d5e9c288e26b81.

Reason for revert: Relaxed too-strict check in CheckSafeToWait.

Test: ./test.py --host
Bug: 130150240

Change-Id: I8359e595cdd73f49cb68c8c70d755cab0e563ac7
diff --git a/runtime/base/mutex.h b/runtime/base/mutex.h
index 39fd8c8..b966fd4 100644
--- a/runtime/base/mutex.h
+++ b/runtime/base/mutex.h
@@ -401,6 +401,12 @@
   // TODO: remove this.
   void WaitHoldingLocks(Thread* self) NO_THREAD_SAFETY_ANALYSIS;
 
+  void CheckSafeToWait(Thread* self) NO_THREAD_SAFETY_ANALYSIS {
+    if (kDebugLocking) {
+      guard_.CheckSafeToWait(self);
+    }
+  }
+
  private:
   const char* const name_;
   // The Mutex being used by waiters. It is an error to mix condition variables between different