H2 session reuse refactor 1: Rework AddRequestToSpdySessionRequestMap()

Instead of taking an HttpStreamRequest,
SpdySessionPool::AddRequestToSpdySessionRequestMap() now takes a new
delegate interface. It returns an object that can be deleted to cancel the
request, instead of taking the HttpStreamRequest against to cancel.

Instead of relying on the HttpStreamRequest to track what
SpdySessionKey is being watched, the SpdySessionPool now handles that
itself.

Finally, the new delegate interface takes the SpdySession itself when
a matching SpdySession is creating, and then makes the appropriate stream
type on top of it, instead of requiring the SpdySessionPool to make a
stream of the correct type. The new behavior more closely matches the
common case where HttpStreamFactory::Job makes the streams.

Bug: 912727
Change-Id: Icb1138e2f7438459019e9ed6f04e38aecf408c94
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1549900
Commit-Queue: Matt Menke <[email protected]>
Reviewed-by: Bence Béky <[email protected]>
Cr-Commit-Position: refs/heads/master@{#650403}
6 files changed