Skip foreign fetch when the skipServiceWorker flag is set on a request.

Foreign fetch used to completely ignore the skipServiceWorker flag. Just skipping
foreign fetch whenever skipServiceWorker is true would not be correct as the flag
is both set in situations where a request needs to bypass service workers, but
also when the renderer doesn't believe the client making the request is controlled
by a service worker. In that second case foreign fetch would still need to process
the request.

To fix this, this changes skipServiceWorker to an enum with three states, in
order to distinguish between skipping all service workers (for CORS preflight,
dev-tools skip service worker, force-refresh, etc) and skipping just the
controlling service worker.

This also makes sure that (for now) any request that requires a CORS preflight
will not get intercepted by foreign fetch.

BUG=540509,604084

Review-Url: https://codereview.chromium.org/2105503002
Cr-Commit-Position: refs/heads/master@{#403312}
33 files changed