ART: Use Overwrite instead of Put

Allow threads exiting twice when tracing.

Bug: 18469797

Change-Id: I88ce5ea8237e53a76ad68fd4b28a367f58e6d635
diff --git a/runtime/trace.cc b/runtime/trace.cc
index 2cc50b3..b510844 100644
--- a/runtime/trace.cc
+++ b/runtime/trace.cc
@@ -735,7 +735,9 @@
   if (the_trace_ != nullptr) {
     std::string name;
     thread->GetThreadName(name);
-    the_trace_->exited_threads_.Put(thread->GetTid(), name);
+    // The same thread/tid may be used multiple times. As SafeMap::Put does not allow to override
+    // a previous mapping, use SafeMap::Overwrite.
+    the_trace_->exited_threads_.Overwrite(thread->GetTid(), name);
   }
 }