Align IndexedDB metadata rollback on transaction abort to spec.

When an IndexedDB versionchange transaction is aborted, Blink's
IndexedDB metadata is not entirely reverted, causing our behavior to
deviate from the IndexedDB specification in minor, subtle ways. This
change aligns our behavior with the spec and with Firefox's
implementation.

The change also (slightly) reduces IndexedDB memory usage in two ways.
(1) Object store and index metadata is now shared between an IDBDatabase
and its associated IDBObjectStore and IDBIndex instances, instead of
being copied. (2) versionchange transactions only back up the metadata
for object stores that are accessed by JavaScript, instead of creating a
backup for the entire database metadata.

BUG=645018,457447

Review-Url: https://codereview.chromium.org/2314933005
Cr-Commit-Position: refs/heads/master@{#423742}
19 files changed