issue #2087: Sorts listeners only when flag is dirty. setPriority is only valid in fixed priority listener.
Merge pull request #3692 from dumganhar/iss2087-new-event-dispatcher

issue #2087: Sorts listeners only when flag is dirty. setPriority is only valid in fixed priority listener.