Replacing heap.js with heapqueue.js

Inevitably the forces of not-invented-here syndrome strike again now
with redoubled fervor! Well I mean, when I’ve already hacked together
parts of js-priority-queue in order to satiate a moderate case of
software anorexia, I might as well go the step further to strip it down
to its bare necessities and write it the way I guess I would have
written it.