linrange for constructing ranges by endpoints and length
linrange length check, add tests
linrange type consistency
Merge pull request #6627 from simonbyrne/linrange

`linrange` for constructing ranges by endpoints and length