Revert^2 "Don't wait with mutator lock""

This reverts commit f2298b784e3b57905fdc4eb720df54cb2a257a23.

PS1 is the same as aosp/2199339

PS2 fixes a bug in CompileForTest that caused failures in
MakeInitializedClassesVisiblyInitialized. Due to incomplete stack
traces, it is unclear whether this was the only cause of failures.
It also adds a check in DoCompilation that may help with tracking
down others.

PS3-4 fix a code typo and the commit message.

PS5 adds a thread suspension around the call to
MakeInitializedClassesVisiblyInitialized in EnterTransactionMode.

PS6 fixes a small problem with the PS5 change.

PS7 was an incorrect attempt to undo PS5 and PS6 and instead weaken
the assertion in MakeInitializedClassesVisiblyInitialized.

PS8 redoes this correctly by just not checking for the EnterTransaction
call. This is a stopgap, since PS5 results (not entirely unexpectedly)
in heap posisoning failures.

PS9 also disables checking inside ClassLinkerTest::AssertObjectClass.

Test: Build and boot AOSP.
Bug: 243086427
Bug: 253691761
Change-Id: I3673b0cbee4b156338088d9783269dc2a0388cba
8 files changed