ART: Do not recursively abort when visiting locks in a bad state

This avoids a nested abort in VisitLocks.

Bug: 17080621, 16382675

(cherry picked from commit 760172c3ccd6e75f6f1a89d8006934e8ffb1303e)

Change-Id: Id604976ac9dcac0e319fb25cab4d2cbc98d7ee24
diff --git a/runtime/thread.cc b/runtime/thread.cc
index f06d081..c7cd57d 100644
--- a/runtime/thread.cc
+++ b/runtime/thread.cc
@@ -906,7 +906,8 @@
         Monitor::DescribeWait(os, thread);
       }
       if (can_allocate) {
-        Monitor::VisitLocks(this, DumpLockedObject, &os);
+        // Visit locks, but do not abort on errors. This would trigger a nested abort.
+        Monitor::VisitLocks(this, DumpLockedObject, &os, false);
       }
     }