Back button now jumps back to previous scroll position.

Originally, pressing the back button would do nothing because the hash was being set after scrolling. This meant that the browser's stored position was the one that had just been scrolled to.

This patch sets the hash before scrolling, thus storing the actual previous position. This causes the browser to jump to the anchor, so the script jumps back to the previous position and then scrolls to the new position.