Move outgoing HTTP header generation to HTTP1Connection.
Unify WSGI support with the HTTPConnection abstraction.

Deprecate WSGIApplication in favor of a WSGIAdapter that can wrap
an ordinary Application.

Remove the wsgi module's separate HTTPRequest variant and tornado.web's
wsgi special cases.
Pass start_line to headers_received as a tuple instead of a string.
Move chunked-response generation into http1connection.
Allow gzip to be used with WSGIApplication.

Now that transfer encodings have been moved to http1connection,
the content-level output transforms can be used with wsgi.
HTTPServer: Support requests that are received in multiple chunks.
Make Application an HTTPServerConnectionDelegate.

HTTPServer now forwards delegate events to its request callback
if it implements this interface.  This allows the application to be
in the loop as the request is being read.
Add chunk and callback arguments to write_headers.

This restores an optimization that allows small responses to be written out
in the same system call as the headers.
Stop overriding _execute in WebSocketHandler; use get() instead.

Revise HTTP1Connection detach protocol.

As a side effect, this now decodes the arguments to open() in the same
way as the arguments to get().
Simplify RequestHandler._execute by making it a coroutine.
Introduce a fast path for coroutines that run to completion without yielding.

This mitigates the performance impact of allowing coroutines in
RequestHandler._execute when that capability is not actually used.
Introduce streaming request body support for RequestHandler.
When a streaming-body request finishes early, stop reading the request data.

delegate.data_received should no longer be called after conn.finish().