Fix mutex issue

We were having some issues with mutex locking order related to
upgrading local to global references when recording non-debuggable
classes. We refactored this code so there is no longer this issue.

Bug: 35838746
Test: Build and boot a marlin with libartd.so

Change-Id: I093b433d921478307130c49a07d0c7ec34dd070d
2 files changed