Use the interpreter as a heartbeat for the JIT.

When doing a partial code cache collection, update all entrypoints to
interpreter, so that the next full collection will remove code
that wasn't executed during that window.

bug:27398183
bug:23128949
bug:26846185

Change-Id: I4423f5c4810dac183dc8973078bf218818745e80
diff --git a/runtime/jit/jit.cc b/runtime/jit/jit.cc
index 3e66ce2..91b006a 100644
--- a/runtime/jit/jit.cc
+++ b/runtime/jit/jit.cc
@@ -213,6 +213,10 @@
   return false;
 }
 
+bool Jit::CanInvokeCompiledCode(ArtMethod* method) {
+  return code_cache_->ContainsPc(method->GetEntryPointFromQuickCompiledCode());
+}
+
 Jit::~Jit() {
   DCHECK(!save_profiling_info_ || !ProfileSaver::IsStarted());
   if (dump_info_on_shutdown_) {