core: Add a rand::Rand trait that is implemented by types that can be
randomly generated
Also adds Rng::gen() for generating any type that implements the Rand
trait
auto merge of #4801 : z0w0/rust/randomtrait, r=graydon

Also adds Rng::gen() for generically generating any type that implements the Rand trait. There's no way to generate things with a length (for e.g. strings or vectors), because I can't think of an elegant way to do that. Maybe have a RandLen trait that inherits Rand?

This can be used for a quickcheck mechanism I'm working on.