Avoid unnecessary repaints (#40)

Use the last render time and the scroll speed to work out whether we actually need to paint anything yet. If not, we can avoid a full repaint and return immediately.

Thanks to Bai Yang (@asbai) for the initial version of this patch.
Old browsers with multiple charts in document don't flicker (#40)

The shared 'lastTime' variable in the fallback function for requestAnimationFrame caused thrashing and inconsistent spacing of frames when more than one animation loop was run. Instead, frames are now requested for 16 ms away, which in the ideal case gives 60 fps. In practice it is slightly lower, however it is still nice and smooooooth.

You can test this by commenting out all the lines like: window.requestAnimationFrame, etc.

Thanks to Bai Yang (@asbai) for providing the logic for this patch.
Bumped version to 1.19.
Merge remote-tracking branch 'upstream/master'
update to 1.19