add `compare` module with comparators

Take two. The heap code will follow later.
The theoretical use case is for creating another collection with the same ordering, though that'll probably be more useful in some kind of generic `PriorityQueue` trait or an analogous one for `SortedSet`. I can remove it if it seems like overkill for the moment.