avoid race when pry thread is already killed

Pry might have been killed during the Pry.start mutex, which means `@thread` could be nil just after it exists the synchronize block. Also, it uses a mutex to read the `@thread` value - just in case it gets reset by the kill block as well.