"InitGoogle"-style argv stashing.

This lets us give the command line in crash dumps when dex2oat dies in the
continuous build on the Mac. I've also taken the opportunity to use the
basename of argv[0] as the default log tag, so dex2oat will now show up in
logcat as "dex2oat" instead of "art" (and we can probably stop manually
prefixing dex2oat log output).

Also stash pthread_self() so we can _correctly_ report "handle=" in the
SIGQUIT output.

Change-Id: Ia8249cd19bab5b816cb94a531a65becdfacaa98b
diff --git a/src/thread_list.cc b/src/thread_list.cc
index 3d0e0be..0dc06f8 100644
--- a/src/thread_list.cc
+++ b/src/thread_list.cc
@@ -86,8 +86,8 @@
   }
 
   dirent de;
-  dirent* result;
-  while (!readdir_r(d, &de, &result) && result != NULL) {
+  dirent* e;
+  while (!readdir_r(d, &de, &e) && e != NULL) {
     char* end;
     pid_t tid = strtol(de.d_name, &end, 10);
     if (!*end && !Contains(tid)) {