Add two locks to expected_mutexes_on_weak_ref_access_.

The ObjectRegistry lock and the jdwp event list lock to avoid DCHECK
failures.

Some cleanup.

Bug: 35360959
Bug: 35745310
Test: test-art-host
Test: jdwp test.
Test: angler boot.
Change-Id: I16000c0c7624b1271d40c4c1a01a4e249271b67e
6 files changed