Avoid std::string allocations for finding an array class.

Introduce ClassLinker::FindArrayClass which performs an array class lookup
given the element/component class. This has a 16 element cache of recently
looked up arrays.
Pass the current thread to ClassLinker Find .. Class routines to avoid calls
to Thread::Current().
Avoid some uses of FindClass in the debugger where WellKnownClasses is a
faster and more compacting GC friendly alternative.

Change-Id: I60e231820b349543a7edb3ceb9cf1ce92db3c843
diff --git a/compiler/oat_test.cc b/compiler/oat_test.cc
index 10d2c5c..e9c77d1 100644
--- a/compiler/oat_test.cc
+++ b/compiler/oat_test.cc
@@ -150,8 +150,8 @@
       num_virtual_methods = it.NumVirtualMethods();
     }
     const char* descriptor = dex_file->GetClassDescriptor(class_def);
-    SirtRef<mirror::ClassLoader> loader(Thread::Current(), nullptr);
-    mirror::Class* klass = class_linker->FindClass(descriptor, loader);
+    SirtRef<mirror::ClassLoader> loader(soa.Self(), nullptr);
+    mirror::Class* klass = class_linker->FindClass(soa.Self(), descriptor, loader);
 
     UniquePtr<const OatFile::OatClass> oat_class(oat_dex_file->GetOatClass(i));
     CHECK_EQ(mirror::Class::Status::kStatusNotReady, oat_class->GetStatus()) << descriptor;