Fix nested parallel/sequential animations combined with animators.

The logic for looping uncontrolled animations in
QAbstractAnimationJob::setCurrentTime assumes that uncontrolled
animations return duration == -1, always. The logic falls apart when a
duration gets set while the animation is running. To rememdy this,
update QParallelAnimation's duration to return -1 for this case. This
is also how the sequential group's duration is implemented so these
are now using the same pattern.

Update the logic in parallel animations to flush previous loops in
updateAnimationsTime to handle the case where duration is -1. This
solves the case where we have for instance:

ParallelAnimation
  Sequential
    YAnimator: duration: 1000
    ScriptAction ...
  Sequential
    Pause duration: 5000 <--- longer than yanimator
    ScriptAction ...

Task-number: QTBUG-37246
Change-Id: I7a1ea547b2f3090feb8b1e87aa7ca746151736fa
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Fix sequential animations with uncontrolled looped children.

An animation needs to be through all its loop cycles or
explicitly stopped before we can consider it finished.

Task-number: QTBUG-37246
Change-Id: Ia30b27448ec7a1e0d2dd8165575b8a7105caae8d
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Reset loop counters when animations are started.

Where normal animations would derive the current loop from the current
time, uncontrolled animations use an iterative approach and which was
not reset when an animation was restarted or a parent had a loop
around it.

Change-Id: Ia7a1880c8b7578463dff4c5ddeab48324bcb32ee
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Append the start time of the current loop to the animation time.

currentTime() uses the total time, so when we use only the loop-local
time for the child animations, normal animations will seem to have
terminated long ago (on the previous loop).

Change-Id: I80a229f40a99569014d8082d153ad579c09fb9db
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Testcase for mixing sequential, parallel with loops and animators.

Task-number: QTBUG-37246
Change-Id: I50c2d46f79fb79cb6eba856ba5b187358f1f2a52
Reviewed-by: Michael Brasser <michael.brasser@live.com>