[net] Fix spoof attack on file:// URLs on POSIX systems

For file:// URLs on POSIX, we currently discard the host portion of the
URL, and treat all file:// URLs as local. On Windows, we use the host
portion as the SAMBA share, so this bug is inapplicable to Windows.

This allows us to have URLs like:
file://accounts.google.com/home/tommycli/Downloads/evil.html

This is a low severity bug, since it's quite hard to exploit, but we
should fix it anyways.

RFC 8089 doesn't actually prohibit our previous behavior, but it does
frown on it.

This CL *could* break file:// links that relied on the old behavior,
but those file:// links should probably be rightfully-broken, since
they didn't work on Windows anyways.

Bug: 881675
Change-Id: Ie9c90ac6285b698089205e73f46f0af13867e806
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1907071
Reviewed-by: Adam Langley <[email protected]>
Reviewed-by: Min Qin <[email protected]>
Reviewed-by: Mohammad Refaat <[email protected]>
Commit-Queue: Tommy Li <[email protected]>
Cr-Commit-Position: refs/heads/master@{#715373}
5 files changed