Fix "remember last position"

Rewrite to detect last position using the Waypoints jQuery plugin instead of manually parsing the section headings. Fixes #121.