Move debugged-tgid hack into ReplaySession.

#603