Fixed EventDispatcher.trigger() order.

Now there shouldn’t be problems in case of listener removal during a
trigger.