Make TypeRange and TypeSpec clearer

Adds documentation and cleans up some tests
Merge pull request #3224 from cleishm/infimum_supremum

Make TypeRange and TypeSpec clearer