Consolidates event listener code

Consolidates event listener code into a module that can be shared
across modules that broadcast events that can be observed.
Merge pull request #662 from codeforamerica/addeventlistener-module

Consolidates event listener code