ART: Cache resolved types in InstructionBuilder.

And avoid using the CompilerDriver for class resolution
and retrieving CompilerOptions.

Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Change-Id: Icec3de58456cfeaf3f2be6e57e037fdf45e8b851
diff --git a/compiler/optimizing/instruction_builder.h b/compiler/optimizing/instruction_builder.h
index 0ee026a..21afd11 100644
--- a/compiler/optimizing/instruction_builder.h
+++ b/compiler/optimizing/instruction_builder.h
@@ -338,6 +338,10 @@
 
   ScopedArenaVector<HBasicBlock*> loop_headers_;
 
+  // Cached resolved types for the current compilation unit's DexFile.
+  // Handle<>s reference entries in the `handles_`.
+  ScopedArenaSafeMap<dex::TypeIndex, Handle<mirror::Class>> class_cache_;
+
   static constexpr int kDefaultNumberOfLoops = 2;
 
   DISALLOW_COPY_AND_ASSIGN(HInstructionBuilder);