model: implement get_next_replay() and advance_backtracking_state()