Change listeners command to make it compatible with Sf 2.4:

- Added a method to resolve service definition, was removed from ContainerDebugCommand at:
https://github.com/symfony/symfony/commit/22f9bc887e3bf25f4a2ce16bbf0d45549bfd0178#diff-b3847149480405e1de881530b4c75ab5

- Changed the way the check that event_dispatcher exists, because the event_dispatcher was renamed to debug.event_dispatcher when kernel.debug is true on:
https://github.com/symfony/symfony/commit/1e1835ef59424b0ce16d0a74e2854946d06ce486