Fix animation timer drift

When dragging a shape, a timer used to simulate the animation frame. In some situation the timer drifted a lot which cause a noticeable lag while dragging. Fixed the timer drift by a technique introduced in following post:

http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating