Add a missing implementation of getindex for Ranges

Also eliminates a redundant bounds check
Merge pull request #7816 from JuliaLang/teh/range_getindex

Add a missing implementation of getindex for Ranges