Support looping for "uncontrolled animations".

The render thread animations rely heavily on uncontrolled
animations, meaning animations with duration=-1. We support
this by adding a m_currentLoopStartTime and incrementally
counting the finish time of each uncontrolled animation.

Change-Id: I1f2ccea09aff4c51b1a7f98a2ddb58636af50557
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
QSGRenderLoop: don't dereference gl pointer if it has been deleted

Change-Id: Icd612b243cdfe1248d1b94964c53f5102f9558d2
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>