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 fixes crash errors when crawlers happen upon these old links.
Ensure we perform at least one authentication on successful register.

Prosody does some housekeeping on first login, which doesn't occur if
the user never logs in.
Merge pull request #224 from jbarrett/redirect-broken-comment-links

Redirect old forum links to new thread links, where possible.
Merge pull request #225 from jbarrett/xmpp-login-on-register

Ensure we perform at least one authentication on successful register.