ART: Fix JDWP GetClassLoader command

The command is spec-ed to take a type, and return the type's
classloader. Decode the input as a class, just like all the
other ReferenceType commands already do.

Bug: 26349019
Change-Id: I129fbc844f529fa9234742ffe128d7ac41ce6d7e
diff --git a/runtime/debugger.cc b/runtime/debugger.cc
index e0211f5..6e11cf8 100644
--- a/runtime/debugger.cc
+++ b/runtime/debugger.cc
@@ -726,11 +726,11 @@
 
 JDWP::JdwpError Dbg::GetClassLoader(JDWP::RefTypeId id, JDWP::ExpandBuf* pReply) {
   JDWP::JdwpError error;
-  mirror::Object* o = gRegistry->Get<mirror::Object*>(id, &error);
-  if (o == nullptr) {
-    return JDWP::ERR_INVALID_OBJECT;
+  mirror::Class* c = DecodeClass(id, &error);
+  if (c == nullptr) {
+    return error;
   }
-  expandBufAddObjectId(pReply, gRegistry->Add(o->GetClass()->GetClassLoader()));
+  expandBufAddObjectId(pReply, gRegistry->Add(c->GetClassLoader()));
   return JDWP::ERR_NONE;
 }