vendor PriorityQueue.js

fetched from https://github.com/augustohp/Priority-Queue-NodeJS @ afae37d40
un-nodejs-ify PriorityQueue
add update() function to PriorityQueue
push/update each received event on a priority queue
PriorityQueue: add 2 functions to return top/bottom priorities instead of values
remove expired events no longer matching query

Every clock tick, check if the lowest priority item in the priority
queue is in the past, and possibly expire it.

This prevents events from stalling in the dashboard forever when they
don't receive any more updates from riemann because thoses updates don't
match the query used.
register one expiration timer per subscription

... instead of a global one, which breaks when there is more than
one view per workspace
Merge pull request #47 from mfournier/expire-using-prioqueue

Expire using prioqueue