Add more read barriers for JNI roots.

To make it possible to concurrently scan the JNI global roots (that
is, the roots visited by JavaVMExt::VisitRoots()), add read barriers
to the indirect reference table and the reference table.

Also, add read barriers to the jmethodID/jfieldID decode routines
(ScopedObjectAccessAlreadyRunnable::DecodeField/DecodeMethod) so that
we can concurrently handle (encoded) fields and methods.

Bug: 12687968
Change-Id: I3df4e4e622a572ff0ea8d44b2dc70a4d6b3ba058
diff --git a/runtime/indirect_reference_table-inl.h b/runtime/indirect_reference_table-inl.h
index b787233..f561643 100644
--- a/runtime/indirect_reference_table-inl.h
+++ b/runtime/indirect_reference_table-inl.h
@@ -59,8 +59,7 @@
 
 // Make sure that the entry at "idx" is correctly paired with "iref".
 inline bool IndirectReferenceTable::CheckEntry(const char* what, IndirectRef iref, int idx) const {
-  const mirror::Object* obj = table_[idx];
-  IndirectRef checkRef = ToIndirectRef(obj, idx);
+  IndirectRef checkRef = ToIndirectRef(idx);
   if (UNLIKELY(checkRef != iref)) {
     LOG(ERROR) << "JNI ERROR (app bug): attempt to " << what
                << " stale " << kind_ << " " << iref