Remove some unused code in replayer.c, split out advance-trace logic, and get warnings to 0

Straightforward small refactoring, -> automerge.