ART: Add synchronous checkpoint

Add a thread function that will run the given checkpoint function
on the thread and wait for its completion.

Bug: 31684812
Test: m test-art-host
Change-Id: Icbb9f3a6b0bbf31e62be0508714ee172456bea29
diff --git a/runtime/thread.h b/runtime/thread.h
index 07ed78b..75b5b12 100644
--- a/runtime/thread.h
+++ b/runtime/thread.h
@@ -237,6 +237,8 @@
 
   bool RequestCheckpoint(Closure* function)
       REQUIRES(Locks::thread_suspend_count_lock_);
+  void RequestSynchronousCheckpoint(Closure* function)
+      REQUIRES(!Locks::thread_suspend_count_lock_, !Locks::thread_list_lock_);
 
   void SetFlipFunction(Closure* function);
   Closure* GetFlipFunction();