Add Comparator object

It can be used in any algorithm and data structure that involves sorting/comparing
and makes possible to:
* Reduce code repetition: MaxHeap is now just a MinHeap with a "reverse" comparator
* Store complex data types like objects in those datastructures with a proper way to compare them