Fixes #17822. Ensure onFlickAnimationStart() is triggered in all scrollTypes, and onFlickAnimationEnd() is not triggered twice when scrolling on one direction with scrollType=2

Replaces #85.