Fix #8257

This version of `rand(r::Range)` and `rand!(r::Range,a::AbstractArray)`
uses getindex instead of trying to calculate the exact value of the
range. This is good because we avoid duplicating the getindex logic in
`FloatRange`

Also added tests, and fixed a small issue in `in(v, r::Range)` where two
calls to step() is not needed
Merge pull request #8273 from ivarne/rand_range

Fix #8257