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

...=djf, a=1.4+

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

Conflicts:
	shared/js/async_storage.js