Made sure that the idle timeout mechanism notifies the destination
that the connection will close.
Also reviewed the close protocol to be: notify destination, then abort,
then close. In this way, HTTP/2 can send RST_STREAM before the
connection is closed.
Improved fix, notifying the response.success event using a
CompletableCallback to avoid that HttpReceiver.responseContent()
fails the update from ResponseState.TRANSIENT.
Added guard to avoid that the idle timeout expires just before
sending the request.
Reworked the way idle timeouts are handled, to support the case where
the idle timeout just expired and the request can be tried on a
different connection/channel.
Fixed by reworking how ClientConnectionFactories are handled by both
HTTP2Client and by HttpClientTransportOverHTTP2, to avoid that the
latter wraps the nested factories with SslConnection twice.
HttpInput was using a bounded ArrayQueue with max capacity 64.
The queue was overflowing if there were more than 64 reads within the
flow control window capacity.
Fixed by replacing the ArrayQueue with ArrayDeque, which is unbounded.
The client connection's promise was succeeded in the context of a
call to SelectorManager.newConnection().
This was wrong, since succeeding the promise may trigger the send
of a request *before* the connection is actually linked to the
endPoint and opened.
This change moves the succeeding of the client connection's promise
to the connection onOpen() method.