Requested by toothr on #pocoo.
Prior to this commit, the send_file max-age hook and config were only used for the static file handler. Now they are used when calling helpers.send_file directly.
Prompted by plaes on #pocoo, mitsuhiko confirmed to use American English.
Add new exceptions module, to implement JSONHttpException and JSONBadRequest.
Using notes in 8445f0d
Need to add the same hook in a Blueprint, but this is the first such case where we need app.config in the Blueprint.
This allows for a view function to return something like: jsonify(error="error msg"), 400
…tion/json and the body of the response should be a JSON object.