gdbserver: don't pick a random thread if the current thread dies