trigger "replicated" and "denied" events on db.sync & db.replicate

<del>@nolanlawson I've added tests for `db.sync` as well, to make sure that the `replicated` and `denied` events get triggered, but I didn't need to put in any extra code for proxying – or am I missing something</del> <ins>https://github.com/pouchdb/pouchdb/pull/3270#issuecomment-68217350</ins>
tiny nit, can go on the same line as previous