Make ThreadList::GetSelectedThread() select and return the 0th thread if there's no
currently selected thread.  And update the call sites accordingly.

llvm-svn: 138577
diff --git a/lldb/source/Target/ThreadList.cpp b/lldb/source/Target/ThreadList.cpp
index ac0797d..2b5a10d 100644
--- a/lldb/source/Target/ThreadList.cpp
+++ b/lldb/source/Target/ThreadList.cpp
@@ -545,6 +545,8 @@
 ThreadList::GetSelectedThread ()
 {
     Mutex::Locker locker(m_threads_mutex);
+    if (m_selected_tid == LLDB_INVALID_THREAD_ID)
+        SetSelectedThreadByID(m_threads[0]->GetID());
     return FindThreadByID(m_selected_tid);
 }