Add a structured request object.
Add a structured request object.

This currently monitors duration from recv to finish, and maintains a deferred
which is resolved/rejected depending on the outcome of the request. This will
eventually become part of the public interface, which will make testing
significantly easier (at the moment it's guesswork to determine when a request
has been processed if the request doesn't make an outgoing connection).

matrix-org/matrix-appservice-irc,matrix-org/matrix-appservice-irc,martindale/matrix-appservice-irc,matrix-org/matrix-appservice-irc