Add unit test for EventDispatcher listener list snapshotting

Fixes #1245