(#2931) - parallel compaction keeps db integrity

Contains two fixes:

1. adapter.js no longer passes the rev_tree to the underlying
   adapter. The adapter is expected to recalculate, since otherwise the database may change in the interim.
2. leveldb.js has a global write lock for all readwrite operations,
   similar to how WebSQL/IndexedDB work under the hood. I'm not
   100% satisfied with that, but it's better for the db to be
   correct than to be fast.
sounds good to me, but let me just check that this is green first