Add support for the symfony console events

Uses a separate event dispatcher to avoid issues with formatter listeners not being registered when the dispatcher is requested from the container.