Fix: IndexedDB and IDBTransaction leaking to global

The test suite raises a failure because of the leaking, and a library should not modify global anyway. This change sets the IndexedDB and IDBTransaction functions (when they exist) to the StickyStore.prototype instead of window.