Redirect back to instance after account upgrade

When an account is upgraded redirect the user back to the instance which
they were originally trying to log into.
Remove unique constraint on resetPasswordToken

If this column is required to be unique then there can't be two entries
in the accounts collection with a 'null' resetPasswordToken, which means
there is an error as soon as a second person tries to sign up.
Redirect to new instance page after registration

After a user has registered for an account take them to the new instance
screen.
Add link to user admin on instance app

Link to the user admin page from the top menu in the instance app if
they have permission to access the admin page.
Add link to registration from login screen
Legacy API credentials will continue to work for now

Add a note to the legacy account upgrade screen informing the user that
their legacy credentials will continue to work for the time being.
Add link to registration on the homepage
Fix site not found 404 page

This page was giving an error when accessed because the authorization
middleware wasn't being loaded early enough so the 'userCan' helper
wasn't available in the template. To avoid this I've moved the auth
middleware up the stack so it's already done when the instanceSelector
runs.

This has required a small change to the deserializeUser method so that
it doesn't depend on 'req.popit' being available, since the
instanceSelector middleware is now run after the auth.
Prevent basic auth login appearing when creating user

This was trying to authenticate with basic auth, even if the user was
already authenticated with a cookie.
Add post-registration email

Send the user an email with some useful links after they have signed up.