Queue all IDB write transactions and execute 1 by 1

IndexedDB can’t handle the large number of parallel writes we throw at
it.  This de-parallelizes all writes into an operation queue that self
executes the next transaction operation when one is finished.

This speeds up login DB writing on both Chrome and FF by large margins - as well as reduces CPU and RAM usage for both browsers.

TODO: specs