Note that merge compares entire events rather than just start
times. This is to ensure that it is commutative, a desirable
condition for some of the proofs used in secref{equivalence}.
It is also necessary to assert a unique representation
of the performance independent of the structure of the 'Music.T note'.
The same function for inserting into a time ordered list with a trailing pause.
The strictness annotation is necessary for working with infinite lists.

Here are two other functions that are already known for non-padded time lists.

Like moveForward but restricts the look-ahead time.
For moveForwardRestricted maxTimeDiff xs
all time differences (aka the moveForward offsets) in xs
must be at most maxTimeDiff.
With this restriction the function is lazy enough
for handling infinite event lists.
However the larger maxTimeDiff the more memory and time is consumed.

concat and concatNaive are essentially the same.
concat must use foldr in order to work on infinite lists,
however if there are many empty lists,
summing of their durations will be done from right to left,
which is inefficient.
Thus we detect subsequent empty lists and merge them from left to right.