Service Worker: Don't write to disk during update until proven necessary
For updates, don't write the main script to disk until a change with the
incumbent script is detected. The incumbent script is progressively
compared with as the new script is read from network. Once a change is
detected, copy everything matched up until now to disk, and from then on
write to disk as the script continues to be read from network.
BUG=457013
Review URL: https://codereview.chromium.org/
1166433003
Cr-Commit-Position: refs/heads/master@{#333031}