Land Recent QUIC Changes.

Refactoring of some QUIC code for readability.

Merge internal change: 83493327
https://codereview.chromium.org/848513002/

Squelch a variety of "GMOCK WARNING" messages in quic_session_test by
using a StrictMock, and adding the necessary EXPECT_CALL()s.

Merge internal change: 83469149
https://codereview.chromium.org/842223006/

Attach QuicAckNotifiers to the serialized packet, instead of individual
stream frames.

Protected behind FLAGS_quic_attach_ack_notifiers_to_packets.

A call to QuicPacketGenerator::ConsumeData may result in multiple stream
frames, in multiple packets, being created to hold the data. Previously
the QuicAckNotifier was attached to each *frame*, but really it should
be attached to the serialized *packet* as the notifier is interested in
knowing when the *packet* gets ACKed.

No behavior change intended.

Added an end to end test demonstrating that the AckNotifier works in the
face of 30% packet loss. Earlier rch and I were sceptical this refactor
would work with retransmissions, but the QuicAckNotifierManager still
recieves calls to UpdateSequenceNumber and does the right thing.

Merge internal change: 83452063
https://codereview.chromium.org/819653006/

Removing deprecated flag FLAGS_allow_truncated_connection_ids_for_quic

Merge internal change: 83439062
https://codereview.chromium.org/843213002/

[email protected]

Review URL: https://codereview.chromium.org/789103013

Cr-Commit-Position: refs/heads/master@{#311316}
diff --git a/net/quic/quic_protocol.h b/net/quic/quic_protocol.h
index 81c87c7..99c0a28 100644
--- a/net/quic/quic_protocol.h
+++ b/net/quic/quic_protocol.h
@@ -661,6 +661,7 @@
   QuicStreamOffset offset;  // Location of this data in the stream.
   IOVector data;
 
+  // TODO(rjshade): Remove with FLAGS_quic_attach_ack_notifiers_to_packets.
   // If this is set, then when this packet is ACKed the AckNotifier will be
   // informed.
   QuicAckNotifier* notifier;
@@ -1066,8 +1067,8 @@
   QuicPacketEntropyHash entropy_hash;
   RetransmittableFrames* retransmittable_frames;
 
-  // If set, these will be called when this packet is ACKed by the peer.
-  std::set<QuicAckNotifier*> notifiers;
+  // Optional notifiers which will be informed when this packet has been ACKed.
+  base::hash_set<QuicAckNotifier*> notifiers;
 };
 
 struct NET_EXPORT_PRIVATE TransmissionInfo {