Mochi Master and authority form fix

This contains all the changes from the current mochi master. I also had to make minor changes to the authority form handling to make it easier (and cheaper) to match on invalid requests.

Has been tested in devcloud. This pull requests is blocking https://trello.com/c/dvjd7yTM/94-mochiweb-connect-crash