IndexedDB: Defer delete calls when there is a running upgrade

Database open requests enter a limbo state when there is an upgrade
running - the request neither proceeds nor blocks, since there is no
successfully opened request to receive the "versionchange" event.
The same should be true for database delete requests, otherwise
either the delete happens during the upgrade (bad!) or is blocked but
the open connection is unaware of the request and can't close itself
(also bad!).

The spec is ambiguous here [1][2]; this change aligns Chrome's
behavior with Firefox.

[1] https://github.com/w3c/IndexedDB/issues/78
[2] https://github.com/w3c/IndexedDB/issues/79

R=palakj@chromium.org,cmumford@chromium.org
BUG=617963

Review-Url: https://codereview.chromium.org/2084053004
Cr-Commit-Position: refs/heads/master@{#404536}
13 files changed