Replace std::deque and std::queue in //net

Replace uses of std::deque with base::circular_deque, and std::queue
with base::queue. Uses in shared QUIC code are unchanged. We are
standardizing on the base implementations to avoid the memory
issues and widely varied implementations of the STL deque. Once most
uses have been replaced, we will add a presubmit check to disallow the
std:: variants.

Three instances of deque were left where circular_deque is not
appropriate (they required pointer stability across resizes).

An implementation of EstimateMemoryUsage is provided for circular_deque
which net required.

BufferedSlice (quic_stream_send_buffer.h) was converted to be move-only
(from being neither movable nor copyable) to support its membership in
a circular_deque.

When a typedef needed required changing, the typedef (and any adjacent
one) was converted to "using" statements.

The WebSocketChannel::PendingReceivedFrame declaration was moved to
the .cc file since the limitations around its declaration in the
header no longer exist (as explained in the removed comment).

One include had to be added to a file in Chrome that was depending on
net to being in <deque>.

Bug: 757232
Change-Id: I8c265044ec2815deae457b299f30bf08938d0b87
Reviewed-on: https://chromium-review.googlesource.com/659317
Commit-Queue: Brett Wilson <[email protected]>
Reviewed-by: Eric Roman <[email protected]>
Cr-Commit-Position: refs/heads/master@{#501105}
diff --git a/net/cookies/cookie_monster.h b/net/cookies/cookie_monster.h
index cf51b6c..99da40b 100644
--- a/net/cookies/cookie_monster.h
+++ b/net/cookies/cookie_monster.h
@@ -10,16 +10,15 @@
 #include <stddef.h>
 #include <stdint.h>
 
-#include <deque>
 #include <map>
 #include <memory>
-#include <queue>
 #include <set>
 #include <string>
 #include <utility>
 #include <vector>
 
 #include "base/callback_forward.h"
+#include "base/containers/circular_deque.h"
 #include "base/gtest_prod_util.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
@@ -685,11 +684,12 @@
   // Map of domain keys to their associated task queues. These tasks are blocked
   // until all cookies for the associated domain key eTLD+1 are loaded from the
   // backend store.
-  std::map<std::string, std::deque<base::OnceClosure>> tasks_pending_for_key_;
+  std::map<std::string, base::circular_deque<base::OnceClosure>>
+      tasks_pending_for_key_;
 
   // Queues tasks that are blocked until all cookies are loaded from the backend
   // store.
-  std::deque<base::OnceClosure> tasks_pending_;
+  base::circular_deque<base::OnceClosure> tasks_pending_;
 
   // Once a global cookie task has been seen, all per-key tasks must be put in
   // |tasks_pending_| instead of |tasks_pending_for_key_| to ensure a reasonable