Fixes due to new "sort forum by unread posts"

I discovered a few issues from this new code which this fixes
 - new threads now go to the first page rather than the last
 - Marking a thread as unread updates HAS_VIEWED_THREAD & removes the 0 from unread posts