Rename GlobalSynchronization to Locks

Also address some review comments in common_throws relating to
ToStr<InvokeType> and exception detail messages.

Change-Id: Ibf2c0f147689fa236d349bd7f01eed3c2522552b
diff --git a/src/common_test.h b/src/common_test.h
index 4424d91..dee40e3 100644
--- a/src/common_test.h
+++ b/src/common_test.h
@@ -209,7 +209,7 @@
                                 );
   }
 
-  void MakeExecutable(Method* method) SHARED_LOCKS_REQUIRED(GlobalSynchronization::mutator_lock_) {
+  void MakeExecutable(Method* method) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
     CHECK(method != NULL);
 
     MethodHelper mh(method);
@@ -452,7 +452,7 @@
   }
 
   jobject LoadDex(const char* dex_name)
-      SHARED_LOCKS_REQUIRED(GlobalSynchronization::mutator_lock_) {
+      SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
     const DexFile* dex_file = OpenTestDexFile(dex_name);
     CHECK(dex_file != NULL);
     class_linker_->RegisterDexFile(*dex_file);
@@ -479,7 +479,7 @@
     }
   }
 
-  void CompileMethod(Method* method) SHARED_LOCKS_REQUIRED(GlobalSynchronization::mutator_lock_) {
+  void CompileMethod(Method* method) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
     CHECK(method != NULL);
     compiler_->CompileOne(method);
     MakeExecutable(method);
@@ -491,7 +491,7 @@
                            const char* class_name,
                            const char* method_name,
                            const char* signature)
-      SHARED_LOCKS_REQUIRED(GlobalSynchronization::mutator_lock_) {
+      SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
     std::string class_descriptor(DotToDescriptor(class_name));
     Class* klass = class_linker_->FindClass(class_descriptor.c_str(), class_loader);
     CHECK(klass != NULL) << "Class not found " << class_name;
@@ -505,7 +505,7 @@
                             const char* class_name,
                             const char* method_name,
                             const char* signature)
-      SHARED_LOCKS_REQUIRED(GlobalSynchronization::mutator_lock_) {
+      SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
     std::string class_descriptor(DotToDescriptor(class_name));
     Class* klass = class_linker_->FindClass(class_descriptor.c_str(), class_loader);
     CHECK(klass != NULL) << "Class not found " << class_name;