core: Rework some rand functions to be more consistent
core: Rework some rand functions to be more consistent

Changed the gen_x_from functions to gen_x_range and made them use the range
[start, end) like other core functions.

rust-lang/rand