(#2391) - improve idb bulkDocs perf

Improve the performance of bulkDocs in idb
by optimistically inserting into the by-seq
store and then recovering from the
rare error only when necessary.
(#2392) - improve websql bulkDocs perf

Basically the same optimization as #2391,
but for websql. Also added a test for sanity.
(#2393) - correct update_seq with successive new_edits