Add tests for CDTDatastoreChangeNotification event firing

This event should be fired for create, update and delete. It can be
on a specific datastore, or globally.

This also fixes a bug where updates didn't fire an event.