Fix TypeError: Cannot read property '0' of undefined

The problem was a callback registered with PubSubClass that wanted to
change the callback list, while PubSubClass was busy iterating over it.

Fixes #51