Fix Flickable movementEnded() signal emission
Fix Flickable movementEnded() signal emission

In case the content was flicked horizontally so that the vertical
position did not change handleMouseReleaseEvent performed a fixup
for the vertical position to be an integer _before_ starting the
horizontal flick. For some large content the rounding fixup had
finished before the flicking animation started which resulted
in a premature emission of the movementEnded() signal.
This race condition did not affect vertical flicking because the
vertical animation had always been started before the horizontal
fixup was scheduled.

The issue was revealed by QQuickWebView which above a certain
velocity threshold locks the movement in one direction, thus
produces the exact same vertical position throughout a horizontal
pan gesture.

This patch removes the race condition by starting the flick
animation in either direction first then performing the
position fixup if needed.

There does not seem to be a reliable way to auto-test this.

Change-Id: Idc8fb59b0a6ead71c6cfc7083a386d51048ec50c
Reviewed-by: Jocelyn Turcotte <753e85bf652920b37407f017540c7aa397985c93@digia.com>
Reviewed-by: Shawn Rutledge <7b40856c8c1100512025516d7c58756d644d9e8d@digia.com>
Reviewed-by: Frederik Gladhorn <bb2d0c2ba681c116a2d12cf46ffa528dd5dd064e@digia.com>

mgrunditz/qtdeclarative-2d,mgrunditz/qtdeclarative-2d,jfaust/qtdeclarative,crobertd/qtdeclarative,mgrunditz/qtdeclarative-2d,matthewvogt/qtdeclarative,matthewvogt/qtdeclarative,qmlc/qtdeclarative,crobertd/qtdeclarative,crobertd/qtdeclarative,mgrunditz/qtdeclarative-2d,corngood/qtdeclarative,qmlc/qtdeclarative,jfaust/qtdeclarative,jfaust/qtdeclarative,qmlc/qtdeclarative,mgrunditz/qtdeclarative-2d,corngood/qtdeclarative,qmlc/qtdeclarative,qmlc/qtdeclarative,matthewvogt/qtdeclarative,corngood/qtdeclarative,jfaust/qtdeclarative,crobertd/qtdeclarative,matthewvogt/qtdeclarative,qmlc/qtdeclarative,crobertd/qtdeclarative,qmlc/qtdeclarative,mgrunditz/qtdeclarative-2d,matthewvogt/qtdeclarative,corngood/qtdeclarative,crobertd/qtdeclarative,qmlc/qtdeclarative,matthewvogt/qtdeclarative,mgrunditz/qtdeclarative-2d,matthewvogt/qtdeclarative,jfaust/qtdeclarative,jfaust/qtdeclarative,corngood/qtdeclarative,matthewvogt/qtdeclarative,corngood/qtdeclarative,corngood/qtdeclarative,jfaust/qtdeclarative,crobertd/qtdeclarative