add `compare` module with comparators

Take two. The heap code will follow later.
Do these non-doc comments break rustdoc?