Limit RAF to new scroll positions

Store last painted scroll position to test if repaint is necessary.