Revert^4 "Add spin loop to mutex, overhaul monitor"

This reverts commit ead89ef62768faa06fedd279b86bccbed1464673.

PS1 is identical to Revert^2.

This fixes a shutdown issue caused by prematurely hanging when we
block while trying to acquire system mutexes during shutdown.

Only refuse to wake up after shutdown is well under way.

Bug: 140590186
Bug: 121302864
Test: Build and boot AOSP.
Test: art/test/testrunner/testrunner.py --host -b -t 1932-monitor-events-misc
Test: art/test/testrunner/testrunner.py --host -b -t 004-ThreadStress
Test: art/test/testrunner/testrunner.py --host -b -t 132-daemon-locks-shutdown
Test: 132-daemon-locks-shutdown repeated with increased thread counts and multiple
concurrent tests.

Change-Id: Ic19d32652a2a05c1ca843b3e9c6e29e6770262da
17 files changed