add single point error handling

Now UserError will be passed to next(), then error middleware will
determine which response to send.
implement errors api

Errors displayed during server render will be displayed under "+errors(messages)" in the respective .jade templates.

Other error boxes are included in various elements as "+errors".

To display an error, alert or request on the client side, use the following:
errors.add(type, message, source)
where type is one of ['error', 'alert', 'request'], message a String, and
source being a jQuery dom object.

The errors api will attempt to find the next best error box to show the error.

In this commit, the only error display implemented on the client side is during submission of an invalid NUSMods url.