Reland "ART: Rewrite compiled code check in FaultHandler."

This reverts commit 263883a3d710c6cb3d683defb5c5da340ee5f88d.

Reason for revert: Reland with a fix for semi-space GC
which holds the mutator lock exclusively when calling
`ClassLinker::CleanupClassLoaders()`.

Change-Id: I262f4d317f42250b7a4c0594e45c4b496747a91f
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing --jit
Test: run-gtests.sh
Test: testrunner.py --target --optimizing
Bug: 38383823
9 files changed