[BUGFIX] Allow setting event dispatcher in DebugSession

This is necessary for using mocks in tests (and might prove useful if
we separate the debug session event handling from the general global
event handling)