Add methods that facilitate testing

Adds a method to add a temporary subscriber that only subscribes for the
duration of the block. This makes it easy to add mocks as a subscriber
to ensure that your events are getting dispatched as expected.