Fix deadlock in VirtualMachine.AllThreads

We cannot add any object in the JDWP object registry while holding the
Locks::thread_list_lock. Indeed we may need to suspend a thread and take it,
causing a deadlock by waiting for ourself on this lock.

Bug: 17343664

(cherry picked from commit d35776413901a6a9d478e06dc354ea4f7d962e04)

Change-Id: I07d150b95a6d2b62c913bf2ca2ac217911b2f19d
2 files changed