Added "last_post" column to the forums table and "last_child_post" column to the forums messages table to track these values. Previously the code was abusing the related object's last_modified field and it didn't bother tracking the date of the last reply to a thread.
Added a not-allowed page, which forums seems to be redirecting to, anyway, but which wasn't there. And changed do_abort so that it doesn't throw an error, but rather an ad_script_abort, and so that it offers the user a login page if he isn't logged in, instead of simply throwing the not-allowed page.