Changes to replay algorithm

Old replay didn't account for how the foundation patch's
line numbers are not always in synch (reference the same state)
as the delta stars. By adjusting the foundation as well as the patch
as the algorithm progresses through the commits, the line numbers
stay current