Accept arguments from JSON encoding method

It's impossible to send arguments to Tornado's json_encode function that one might send to Python's built-in json.dumps. In particular, the latter's default argument accepts a function that can be used to tell the encoder how to handle (for example) datetimes, and I would like to continue doing this while using json_encode. Ditto for json_decode.

This fixes that.