Makes objects known to the debugger GC roots, implements the THST message, and lets DDMS request stack traces.

This fills out correct data in all columns of the "Threads" table, and
double-clicking on a thread shows that thread's stack.

Change-Id: I48f63c3612e12d35269158dc3a283f07db28c8e7
diff --git a/src/thread.cc b/src/thread.cc
index d2c43d9..68acb9b 100644
--- a/src/thread.cc
+++ b/src/thread.cc
@@ -433,17 +433,7 @@
   int utime = 0;
   int stime = 0;
   int task_cpu = 0;
-  std::string stats;
-  if (ReadFileToString(StringPrintf("/proc/self/task/%d/stat", GetTid()).c_str(), &stats)) {
-    // Skip the command, which may contain spaces.
-    stats = stats.substr(stats.find(')') + 2);
-    // Extract the three fields we care about.
-    std::vector<std::string> fields;
-    Split(stats, ' ', fields);
-    utime = strtoull(fields[11].c_str(), NULL, 10);
-    stime = strtoull(fields[12].c_str(), NULL, 10);
-    task_cpu = strtoull(fields[36].c_str(), NULL, 10);
-  }
+  GetTaskStats(GetTid(), utime, stime, task_cpu);
 
   os << "  | schedstat=( " << scheduler_stats << " )"
      << " utm=" << utime