Support redirect for main resource navigation with S13nServiceWorker.

I locally tested these redirect patterns in WPT's navigation-redirect.https.html
with --enable-features=NetworkService flag, after registering the SW without the
flag.

  - Normal redirect to same-origin scope.
  - Normal redirect to other-origin scope.
  - SW-fallbacked redirect to same-origin out-scope.
  - SW-fallbacked redirect to same-origin same-scope.
  - SW-fallbacked redirect to same-origin other-scope.
  - SW-fallbacked redirect to other-origin out-scope.
  - SW-fallbacked redirect to other-origin in-scope.
  - SW-generated redirect to same-origin out-scope.
  - SW-generated redirect to same-origin same-scope.
  - SW-generated redirect to same-origin other-scope.
  - SW-generated redirect to other-origin out-scope.
  - SW-generated redirect to other-origin in-scope.

But other patters in navigation-redirect.https.html failed. It is because there
is another issue in handling manual redirect mode requests in NetworkService.

BUG=764224

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation
Change-Id: I1f4b602e6dd4887aabac770fa2b9d4a6dfb3aeb8
Reviewed-on: https://chromium-review.googlesource.com/668265
Commit-Queue: Tsuyoshi Horo <[email protected]>
Reviewed-by: Matt Falkenhagen <[email protected]>
Reviewed-by: Kinuko Yasuda (slow) <[email protected]>
Cr-Commit-Position: refs/heads/master@{#503467}
3 files changed