add length type parameter to StepRangeLen and LinRange (#41619)
Allows creating these ranges for any type of integer lengths.
Also need to be careful about using additive identity instead of
multiplicative, and be even more consistent now about types in a
few places.
Fixes #41517