Fix iOS stuck in infinite loop bug


A few iOS tests showed that the `scrollTo` function isn't exactly "pixel perfect" on iOS devices, and may produce an infinite loop (seems to be the cause of issue #34 as well).

This fix forces the animation loop to stop if it is calling the last iteration of `animateScroll`.