Check point root marking.

Added thread list checkpoint function, this goes through every thread and runs
the checkpoint on each thread. Threads that are runnable run the checkpoint
callback themselves in the next suspend check, while suspended threads are
left suspended but have the callback called on them.

Added a checkpoint visitor member to each thread, this visitor called when the
checkpoint request flag is set during transitions to suspended from runnable.

Using the checkpoint to mark the roots reduces the first pause of partial /
full gc to around 1 ms.

Change-Id: I97239cc72ee0e4a3397e9138a62ee559268dce0a
diff --git a/src/thread_list.h b/src/thread_list.h
index 3142fd3..a41fa57 100644
--- a/src/thread_list.h
+++ b/src/thread_list.h
@@ -55,6 +55,12 @@
       LOCKS_EXCLUDED(Locks::thread_list_lock_,
                      Locks::thread_suspend_count_lock_);
 
+  // Run a checkpoint on threads, running threads are not suspended but run the checkpoint inside
+  // of the suspend check. Returns how many checkpoints we should expect to run.
+  size_t RunCheckpoint(Thread::CheckpointFunction* checkpoint_function);
+      LOCKS_EXCLUDED(Locks::thread_list_lock_,
+                     Locks::thread_suspend_count_lock_);
+
   // Suspends all threads
   void SuspendAllForDebugger()
       LOCKS_EXCLUDED(Locks::mutator_lock_,