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
Bug: 26118154

(cherry picked from commit e99f53203904c23a26e53ca1bf6a4e45814146fe)

Change-Id: I9e4b8391ebad0bca0e42a03819c58c99ddba6b35
1 file changed