Fix scroll to post function.

When clicking a previously viewed thread, it should now scroll to the
last viewed post. The scroll to last post on page function should also
be fixed.