Added publisher-subscribe pattern.

Basically we have a Publisher singleton, and that singleton contains a one-to-many mapping of event name strings to PubSubListeners. This way, we can trigger events that all registered listeners can respond to.