libcore: make rand::random return a generic value implementing `Rand`.
auto merge of #5987 : huonw/rust/generic-random, r=catamorphism

With this patch `rand::random` can be used to generate anything that implements `Rand`.