QMngHandler: Prevent division by zero.

Task-number: QTBUG-42321
Change-Id: I1d0762782e71fb13f96d0f42c4661b708e02051d
Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
QMngHandler: Avoid endless loop

In case the animation only has one frame, like Waves1.mng in the bug
report.

Task-number: QTBUG-42321
Change-Id: Id6616f4f51c1b6f06f7e4677cbd9e56135d2a52b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>