Thread state fixes.

Attaching a native thread should give you a thread in the kNative state.
To be able to run managed code when a thread detaches, we need to be in
the kRunnable state.

Change-Id: I9c8048469d0e2d2a53e8fd85261975bbffe16b4f
diff --git a/src/thread_list.cc b/src/thread_list.cc
index 9a34426..f49c49d 100644
--- a/src/thread_list.cc
+++ b/src/thread_list.cc
@@ -218,11 +218,15 @@
   }
 }
 
-void ThreadList::Register(Thread* thread) {
-  //LOG(INFO) << "ThreadList::Register() " << *thread;
+void ThreadList::Register() {
+  Thread* self = Thread::Current();
+
+  //LOG(INFO) << "ThreadList::Register() " << *self;
+  self->Dump(std::cerr);
+
   MutexLock mu(thread_list_lock_);
-  CHECK(!Contains(thread));
-  list_.push_back(thread);
+  CHECK(!Contains(self));
+  list_.push_back(self);
 }
 
 void ThreadList::Unregister() {