Consolidate replay-to-async-signal code.