Add Thread entry to signal if the thread can call into java

Compiler threads (AOT or JIT) should not call into Java as they have no
peers (which may lead to crashes, e.g. b/33067273)

Bug: 32602185
Bug: 33067273

Test: m test-art-host-run-test; m test-art-host-gtest
Change-Id: I97dda7a5444643db3c5d5318339a65a602f709e8
diff --git a/runtime/thread_pool.cc b/runtime/thread_pool.cc
index d9d2ea3..7aa1641 100644
--- a/runtime/thread_pool.cc
+++ b/runtime/thread_pool.cc
@@ -86,6 +86,8 @@
   Runtime* runtime = Runtime::Current();
   CHECK(runtime->AttachCurrentThread(worker->name_.c_str(), true, nullptr, false));
   worker->thread_ = Thread::Current();
+  // Thread pool workers cannot call into java.
+  worker->thread_->SetCanCallIntoJava(false);
   // Do work until its time to shut down.
   worker->Run();
   runtime->DetachCurrentThread();