Modified native EventDispatcher to conform to docs regarding event priority.

Expected behaviour is that higher priority listeners will be called first, and where two listeners have the same priority notification order will be the same as order of addition.

This change ensures the list is always sorted with the highest priority listeners first. It does the sorting on addition rather than dispatch, and it only re-sorts when a listener with a non-zero priority is added (a new zero-priority listener should be at the end of the list in any case).

There's a lot of null-checking in the sort event, perhaps there's no need for it.
Merge pull request #77 from muton/master

Modified native EventDispatcher to conform to docs regarding event priority