Redirect old forum links to new thread links, where possible.

Old forum posts contain broken links to other threads. This patch redirects these where possible - the id, if not numeric, is checked against thread keys and redirected to the thread if it exists.

This also fixes crash errors when crawlers happen upon these old links.