Improve rand{T<:Integer}(r::Range1{T}); support for more subtypes of Integer, return values of type T, avoid infinite loop for long signed ranges.
Merge pull request #3194 from GunnarFarneback/rand_from_range

Improvements of rand(Range1).