Erlang impl of a priority heap with O(log n) deletion by value - very useful for A* graph stuff