Implement a basic event queue.

Useful for scripts that need to be run when a certain event has occurred.  Currently only implements a map-agnostic "open" event, and the only functionality that works is events.addListener() and events.emit().