Fix a deadlock in when shutting down the GC thread.

Change-Id: Ief3ec542db45c911ece7b9d02359a9326c5e14c8
diff --git a/vm/alloc/HeapSource.c b/vm/alloc/HeapSource.c
index 66249a1..544230d 100644
--- a/vm/alloc/HeapSource.c
+++ b/vm/alloc/HeapSource.c
@@ -456,8 +456,8 @@
         dvmLockMutex(&gHs->gcThreadMutex);
         gHs->gcThreadShutdown = true;
         dvmSignalCond(&gHs->gcThreadCond);
-        pthread_join(gHs->gcThread, NULL);
         dvmUnlockMutex(&gHs->gcThreadMutex);
+        pthread_join(gHs->gcThread, NULL);
     }
 }