Implement WritableStreamNative

Add a C++ implementation of WritableStream. This is based on the
existing JavaScript implementation, and follows the standard text
closely.

See the design doc for background:
https://docs.google.com/document/d/1n0IIRmJb0R-DFc2IhhJfS2-LUwl6iKSBNaR0klr3o40/edit

The new implementation is protected by a "StreamsNative" blink feature
flag. It does not interoperate with the old implementation: piping
doesn't work when the feature is enabled, and TransformStream uses the
wrong implementation of WritableStream.

A new virtual test suite covers the new code. There are currently many
failing expectations, mostly due to piping being disabled.

BUG=902633

Change-Id: If90c3e93bc812211ea27b1487ed3955c63af54e8
Reviewed-on: https://chromium-review.googlesource.com/c/1445632
Reviewed-by: Yutaka Hirano <[email protected]>
Commit-Queue: Adam Rice <[email protected]>
Cr-Commit-Position: refs/heads/master@{#630966}
diff --git a/third_party/blink/web_tests/VirtualTestSuites b/third_party/blink/web_tests/VirtualTestSuites
index 02e81358..f1a903d 100644
--- a/third_party/blink/web_tests/VirtualTestSuites
+++ b/third_party/blink/web_tests/VirtualTestSuites
@@ -1030,6 +1030,16 @@
     "args": ["--enable-features=ScriptStreamingOnPreload"]
   },
   {
+    "prefix": "streams-native",
+    "base": "external/wpt/streams",
+    "args": ["--enable-blink-features=StreamsNative", "--enable-features=BlinkHeapUnifiedGarbageCollection"]
+  },
+  {
+    "prefix": "streams-native",
+    "base": "http/tests/streams",
+    "args": ["--enable-blink-features=StreamsNative", "--enable-features=BlinkHeapUnifiedGarbageCollection"]
+  },
+  {
     "prefix": "spatial-navigation-force-outline",
     "base": "fast/spatial-navigation",
     "args": ["--enable-blink-features=SpatialNavigationForcesOutline"]