Slide position tracking for Reveal.js and refactor scrollbar synchronization

Some refactoring ideas for PR #181.