Add JsonErrorMixin

This commit adds the JsonErrorMixin for formatting error message from a
given RequestHandler as JSON.
I don't think that we should be exposing `log_message` directly.  This is really meant to go to the log file and not be inserted into the response (re [web.HTTPError comment]).  I would consider using either `str(raised_error)` instead.  If we want to sanitize `log_message` and expose it in the future, we could consider doing [something like sentry does].

[web.HTTPError comment]: https://github.com/tornadoweb/tornado/blob/86333d042dd834e55397e287f5e454b4d70bbf63/tornado/web.py#L1938-L1941).
[something like sentry does]: https://github.com/getsentry/raven-python/blob/master/raven/processors.py