Inline field and method resolution.

According to profiling results, field and method resolutions are hot points
during interpreter execution. This CL attempts to speed up these resolutions.

Forces aggressive inlining of FindFieldFromCode and FindMethodFromCode. This
allows to reduce the overhead of access check code when the interpreter runs
without these checks. Templatize these functions to optimize inlining and their
callers.

Also spread the use of C++11 "nullptr" in place of "NULL" in field access and
invoke helpers.

Change-Id: Ic1a69834d8975b2cddcddaae32f08a7de146a951
diff --git a/runtime/mirror/object_test.cc b/runtime/mirror/object_test.cc
index 4c5f90c..6c6d488 100644
--- a/runtime/mirror/object_test.cc
+++ b/runtime/mirror/object_test.cc
@@ -291,8 +291,8 @@
   ASSERT_TRUE(field_id != NULL);
   uint32_t field_idx = dex_file->GetIndexForFieldId(*field_id);
 
-  ArtField* field = FindFieldFromCode(field_idx, clinit, Thread::Current(), StaticObjectRead,
-                                      sizeof(Object*), true);
+  ArtField* field = FindFieldFromCode<StaticObjectRead, true>(field_idx, clinit, Thread::Current(),
+                                                              sizeof(Object*));
   Object* s0 = field->GetObj(klass);
   EXPECT_TRUE(s0 != NULL);