Start parallelizing dex2oat.

This is enough to perform type resolution and verification in parallel.

There appears to be a bug in InitCpu --- if you start enough threads
at once, the CHECK at the end starts to fail, with self_check == NULL; I've
commented it out for now, but this will cause test failures until it's fixed.

Change-Id: I4919682520bc01d3262c6b3d00c7bd2c2860a52e
diff --git a/src/thread.cc b/src/thread.cc
index 8b10ccd..7113655 100644
--- a/src/thread.cc
+++ b/src/thread.cc
@@ -282,7 +282,9 @@
 
   // If we're the main thread, ClassLinker won't be created until after we're attached,
   // so that thread needs a two-stage attach. Regular threads don't need this hack.
-  if (self->thin_lock_id_ != ThreadList::kMainId) {
+  // In the compiler, all threads need this hack, because no-one's going to be getting
+  // a native peer!
+  if (self->thin_lock_id_ != ThreadList::kMainId && !Runtime::Current()->IsCompiler()) {
     self->CreatePeer(name, as_daemon);
   }