Ensure GetPhase returns correct values.

We were incorrectly waiting until after the kInit and kStart runtime
phase callbacks to change the current runtime phase. The phase should
have already changed by the time the VMInit and VMStart are
dispatched.

Test: ./test.py --host -j50
Change-Id: I959221025a6692f2244048aa852170bb70dc2b7a
diff --git a/openjdkjvmti/ti_phase.cc b/openjdkjvmti/ti_phase.cc
index 8893c9b..e8c1ca7 100644
--- a/openjdkjvmti/ti_phase.cc
+++ b/openjdkjvmti/ti_phase.cc
@@ -63,18 +63,18 @@
         break;
       case RuntimePhase::kStart:
         {
+          PhaseUtil::current_phase_ = JVMTI_PHASE_START;
           art::ScopedThreadSuspension sts(art::Thread::Current(), art::ThreadState::kNative);
           event_handler->DispatchEvent<ArtJvmtiEvent::kVmStart>(nullptr, GetJniEnv());
-          PhaseUtil::current_phase_ = JVMTI_PHASE_START;
         }
         break;
       case RuntimePhase::kInit:
         {
           ThreadUtil::CacheData();
+          PhaseUtil::current_phase_ = JVMTI_PHASE_LIVE;
           ScopedLocalRef<jthread> thread(GetJniEnv(), GetCurrentJThread());
           art::ScopedThreadSuspension sts(art::Thread::Current(), art::ThreadState::kNative);
           event_handler->DispatchEvent<ArtJvmtiEvent::kVmInit>(nullptr, GetJniEnv(), thread.get());
-          PhaseUtil::current_phase_ = JVMTI_PHASE_LIVE;
         }
         break;
       case RuntimePhase::kDeath: