Error handling

This introduces an `errors.js` controller and new ServerError class
to be used when routes want to bail out with a suggested status code
and message. The default error handler will obey the status code,
sending the message as text, or JSON if the request was an xhr.
It responds on Errors without a suggested status code with 500.