ServiceWorker: Schedule DeleteAndStartOver when failing to store resource ids

Storing uncommitted or purgeable resource ids maybe bumps the next available
resource id stored in ServiceWorkerDatabase. If these database operations fail,
subsequent resources could use conflicted ids.

To avoid the confliction, this CL makes ServiceWorkerStorage check the result of
storing resource ids and schedule DeleteAndStartOver if there is an error.

BUG=485900, 505322

Review URL: https://codereview.chromium.org/1393783002

Cr-Commit-Position: refs/heads/master@{#354758}
4 files changed