Add GenericTypeComparator

This PR adds the GenericTypeComparator for generic Comparable types (see `GenericTypeInfo`, `GenericTypeComparator`, and `GenericTypeComparatorTest`).

(While implementing, I noticed some code formatting issues, which I've reformatted.)