Get the run locker before you ask if your thread is valid.
Get the run locker before you ask if your thread is valid.

I have occasional crashes coming from SBThread::GetExtendedBacktraceThread.  The 
symptom is that we got true back from HasThreadScope - so we should have a valid
live thread, but then when we go to use the thread, it is not good anymore and we
crash.
I can't spot any obvious cause for this crash, but in looking for same I noticed
that in the current code we check that the thread is valid, THEN we take the stop 
locker.  We really should do that in the other order, and ensure that the process 
will stay stopped before we check our thread is still good.  That's what this patch does.

<rdar://problem/47478205>


git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@357963 91177308-0d34-0410-b5e6-96231b3b80d8

llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb