IndexedDB: Fix event dispatch races in IDBRequest

Fix a pair of issues caught by ASSERTs when debugging another bug:

* An ActiveDOMObject::stop() call coming in between "upgradeneeded"
being queued/dispatched and "success" being queued/dispatched could
leave the IDBRequest in "pending" state for destruction.

* Apparently, the EventQueue occasionally calls into dispatchEvents
after the execution context is torn down.

Review URL: https://codereview.chromium.org/63523002

git-svn-id: svn://svn.chromium.org/blink/trunk@163013 bbb929c8-8fbe-4397-9dbb-9b2b20218538