Replace request.onsuccess with trans.oncomplete for writes to IndexedDB
Merge pull request #1206 from matthew-andrews/trans.oncomplete

Replace request.onsuccess with trans.oncomplete for writes to IndexedDB