More threads work.

Adds stubs (and sometimes implementations) for dalvik.system.VMStack and
java.lang.Thread native methods. There was a bug in the dalvik
thread priority setting code, where the current thread and the passed-in
thread were confused.

I've also pulled Mutex and ThreadList out into their own files, and
moved some functionality around (with the aim of having more stuff
private, especially locks).

Change-Id: Ieb0f22669cac3df44ca34f7868f8e7d4dfa09ab6
diff --git a/src/signal_catcher.cc b/src/signal_catcher.cc
index 1552180..7061b36 100644
--- a/src/signal_catcher.cc
+++ b/src/signal_catcher.cc
@@ -29,8 +29,7 @@
 
 namespace art {
 
-SignalCatcher::SignalCatcher() {
-  lock_ = Mutex::Create("SignalCatcher lock");
+SignalCatcher::SignalCatcher() : lock_("SignalCatcher lock") {
   SetHaltFlag(false);
 
   // Create a raw pthread; its start routine will attach to the runtime.
@@ -72,9 +71,7 @@
     os << "Cmd line: " << cmdline << "\n";
   }
 
-  Runtime* runtime = Runtime::Current();
-  runtime->DumpStatistics(os);
-  runtime->GetThreadList()->Dump(os);
+  Runtime::Current()->Dump(os);
 
   std::string maps;
   if (ReadFileToString("/proc/self/maps", &maps)) {