ART: Make RuntimeCallbacks unique_ptr

Reduce the transitive closure of headers on runtime.h

Test: m
Change-Id: Ib5a3632c28b08bf07773f217a7ad711c1f12af6b
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index a2b462e..5a5ed75 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -137,6 +137,7 @@
 #include "jit/profile_saver.h"
 #include "quick/quick_method_frame_info.h"
 #include "reflection.h"
+#include "runtime_callbacks.h"
 #include "runtime_options.h"
 #include "ScopedLocalRef.h"
 #include "scoped_thread_state_change-inl.h"
@@ -253,10 +254,12 @@
       pruned_dalvik_cache_(false),
       // Initially assume we perceive jank in case the process state is never updated.
       process_state_(kProcessStateJankPerceptible),
-      zygote_no_threads_(false) {
+      zygote_no_threads_(false),
+      cha_(nullptr) {
   CheckAsmSupportOffsetsAndSizes();
   std::fill(callee_save_methods_, callee_save_methods_ + arraysize(callee_save_methods_), 0u);
   interpreter::CheckInterpreterAsmConstants();
+  callbacks_.reset(new RuntimeCallbacks());
 }
 
 Runtime::~Runtime() {
@@ -1100,8 +1103,8 @@
   if (runtime_options.Exists(Opt::JdwpOptions)) {
     Dbg::ConfigureJdwp(runtime_options.GetOrDefault(Opt::JdwpOptions));
   }
-  callbacks_.AddThreadLifecycleCallback(Dbg::GetThreadLifecycleCallback());
-  callbacks_.AddClassLoadCallback(Dbg::GetClassLoadCallback());
+  callbacks_->AddThreadLifecycleCallback(Dbg::GetThreadLifecycleCallback());
+  callbacks_->AddClassLoadCallback(Dbg::GetClassLoadCallback());
 
   jit_options_.reset(jit::JitOptions::CreateFromRuntimeArguments(runtime_options));
   if (IsAotCompiler()) {
@@ -2255,4 +2258,8 @@
   Runtime::Abort(abort_message);
 }
 
+RuntimeCallbacks* Runtime::GetRuntimeCallbacks() {
+  return callbacks_.get();
+}
+
 }  // namespace art