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
Merge branch 2.0-maint into 2.1-maint