Reporting: Send CORS preflight before uploading reports

Per https://github.com/w3c/reporting/issues/41, we're supposed to send a
CORS preflight request before uploading reports, if the origin of the
reports is different than the origin of the collector.

There is existing CORS preflight code in both Blink and the Network
Service.  Code in //net isn't allowed to depend on either of those;
instead of using a delegate to handle the inverted dependency, we just
send out the preflight request by hand, just like the Expect-CT code
does.

Bug: 860802
Change-Id: Ib20db54d3d2597d9fbacfe356e61cc6d3bc9d5fc
Reviewed-on: https://chromium-review.googlesource.com/1128600
Commit-Queue: Douglas Creager <dcreager@chromium.org>
Reviewed-by: Misha Efimov <mef@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574836}
7 files changed