(#2555) - fix 'change' event for db.sync()

This ought to fix it. I also added some tests to ensure we're not leaking any listeners. Apparently calling `removeAllListeners` in `cleanup` is unnecessary, because that gets taken care of in `completeReplication` anyway.
we shouldn't proxy remove listener events to other event emitters because they should only emit those when they have listeners to remove, dude this is as simple as the Haskel type system whats the problem?