[asan] get rid of the scary TSD destructor code. Now, we store the leaky AsanThreadSummary in TSD and never remove it from there.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@147910 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/asan/asan_thread.cc b/lib/asan/asan_thread.cc
index 459b2ef..c61b2b4 100644
--- a/lib/asan/asan_thread.cc
+++ b/lib/asan/asan_thread.cc
@@ -15,6 +15,7 @@
 #include "asan_interceptors.h"
 #include "asan_procmaps.h"
 #include "asan_thread.h"
+#include "asan_thread_registry.h"
 #include "asan_mapping.h"
 
 namespace __asan {
@@ -83,6 +84,9 @@
     Report("T%d exited\n", tid());
   }
 
+  asanThreadRegistry().UnregisterThread(this);
+  this->Destroy();
+
   return res;
 }