Make default listeners easier to override

I moved the default listeners in the event dispatcher to individual container services, so that they can be easily overridden without having to redeclare the dispatcher.

I also removed `function () use ($app)` in favour of `function ($app)` for calls to `share()`, as a follow-up to #433.