QQuickAnimatedImage: reset the loop count when reloading
When the image is reloaded, e.g. because the cache property or the
device pixel ratio changed, a new movie is created, which starts from
the first frame. But the loop count wasn't reset, so the reloaded
animation played fewer loops than requested before finishing.
Reset the loop count and the last frame number when a new movie is set.
Pick-to: 6.12
Change-Id: Ib0801b3f4b99a8fd7b9f1dc1a376ae9965b31b05
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>