Add small thread-local cache for use by the interpreter.

Small (one page) cache which can be used on the hottest paths
in the interpreter and which does not require synchronisation.
This CL adds the code but it does not use it for anything yet.

Test: test-art-host-gtest
Change-Id: I41d4e7a86a0f62f7a4efc165b8934232b4e766c7
diff --git a/runtime/thread.cc b/runtime/thread.cc
index 8a8f537..497b146 100644
--- a/runtime/thread.cc
+++ b/runtime/thread.cc
@@ -4076,4 +4076,13 @@
   UpdateReadBarrierEntrypoints(&tlsPtr_.quick_entrypoints, /* is_active*/ true);
 }
 
+void Thread::ClearAllInterpreterCaches() {
+  static struct ClearInterpreterCacheClosure : Closure {
+    virtual void Run(Thread* thread) {
+      thread->GetInterpreterCache()->Clear(thread);
+    }
+  } closure;
+  Runtime::Current()->GetThreadList()->RunCheckpoint(&closure);
+}
+
 }  // namespace art