Use ScopedObjectAccess in ThreadList::Dump

Prevent deadlocks if two different threads are calling Dump at the
same time:

Thread 1: Requests thread 2 to suspend
Thread 2: Requests thread 1 to suspend
Both threads are suspended and blocked on ScopedObjectAccess in
thread dumping.

Added to suspend all stress, reduced thread count to 4 temporarily
since this is the maximum number of simultaneous checkpoints.

Bug: 28988206

Change-Id: I9e4b8391ebad0bca0e42a03819c58c99ddba6b35
diff --git a/test/149-suspend-all-stress/src/Main.java b/test/149-suspend-all-stress/src/Main.java
index 6a27c4b..aa94fc9 100644
--- a/test/149-suspend-all-stress/src/Main.java
+++ b/test/149-suspend-all-stress/src/Main.java
@@ -17,7 +17,7 @@
 import java.util.Map;
 
 public class Main implements Runnable {
-    static final int numberOfThreads = 8;
+    static final int numberOfThreads = 4;
 
     public static void main(String[] args) throws Exception {
         System.loadLibrary(args[0]);