IndexedDB: Ensure transactions created in microtasks are deactivated

The IDB spec defines that transactions are created 'active' and become
'inactive' when control returns to the event loop. The way this was
implemented, transactions created within microtasks (e.g. Promise
callbacks) were not deactivated.

Flip the order of microtasks and deactivation, and add tests.

BUG=380910
R=adamk@chromium.org

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

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