(#2623) - compaction improvements

compaction now instead of grabbing every single change in the databases history and then compacting each of them, it instead goes through the changes feed and does the compaction on each event and thus use possible less memory (but there is no way for it to use more memory).  

It also saves the last seq it compacted to so that it can start from there next time.

Also I added a hook for adapter specific compaction methods, and added one for level which uses the changes stream to make sure that only one document is compacted at a time, meaning compaction for leveldb will take longer, but use significantly less memory, aka you can do stuff while that's going on in the background and leveldb is likely the only one that will work on arbitrarily large databases.
So I take it that because we didn't have `utils.adapterFun` in here before, it wasn't added to the task queue and therefore might execute before the database is ready?