Sets up a global mediator which pub-subs custom events across components.