Handle streaming requests.

In Tornado RequestHandler classes decorated with the stream_request_body
decorator, the request body may be a Future instance rather than a
string, which breaks currently breaks JSON serialization. This patch
uses a modified JSON encoder for the Tornado module to handle this case
and adds a test to prevent regressions.