Fixes for constant method handles

Add support for constant direct and interface method handles in the
DEX file.

Add error handling for field and method resolution failures in
ClassLinker::ResolveMethodHandle().

Bug: 36957105
Test: art/test/run-test --host 952-invoke-custom-kinds
Change-Id: I91a2a23ba3365310eccb8cadd193b62f57e5811c
diff --git a/compiler/image_writer.cc b/compiler/image_writer.cc
index a8fdeca..e75f75b 100644
--- a/compiler/image_writer.cc
+++ b/compiler/image_writer.cc
@@ -473,6 +473,11 @@
                                  start + layout.MethodTypesOffset(),
                                  dex_cache);
     }
+    if (dex_cache->GetResolvedCallSites() != nullptr) {
+      AddDexCacheArrayRelocation(dex_cache->GetResolvedCallSites(),
+                                 start + layout.CallSitesOffset(),
+                                 dex_cache);
+    }
   }
 }