leveldb workaround

leveldb changes ignores options.limit and doesn't stop when the changes
promise is cancelled. This makes it a bit hard to deal with in a way that
limits maximum memory consumption.

This workaround works, but performance is terrible when replicating a large
number of changes because onChange is called so many times.