retrace: Add optional parameter to allow looping N last frames
retrace: Consolidate loop parameters.

No looping, continous looping, and fixed number of loops, can all be
described with a single variable (0, <0, and >0) respectively.