Issue #6 - Fixing bugs in event queue priority logic.

* Fixed issue with timestamp precision (as stated in the issue).
* Found and fixed another bug with priority sorting.
* Created a unit test to cover all queue sorting logic.