Bug 936703 - [async_storage] callback in transaction.oncomplete event. r=djf

CostControl app invokes |Common.closeApplication()| in its
asyncStorage operation callbacks.  However, these callbacks are
invoked in IDBRequest.onsuccess events when the corresponding
transaction is not necessarily completed.  That is, we may have
following sequence:

  1) IDBRequest.onsuccess
  2) call to Common.closeApplication()
  3) invalidate open IDBDatabase
  4) trying to invoke IDBTransaction.oncomplete results in an
     AbortError.

We should follow W3C's suggestion here -- listen
IDBTransaction.oncomplete instead of IDBRequest.onsuccess.

[1]: http://www.w3.org/TR/IndexedDB/#widl-IDBTransaction-oncomplete
Merge pull request #17380 from vicamo/bugzilla/936703/call-screen-indexeddb-abort-error

Bugzilla/936703/call screen indexeddb abort error