Make random source configurable.

This allows setting an `io.Reader` which will then be used to generate random data. If none is specified, `crypto/rand.Reader` will be used.