Add operator< to TypeDesc

The operator< lets you use TypeDesc as a sort key.

Also conform the comparison arguments to usual conventions.