Move random number generation to separate file

Just like we can build with different hash algorithms we want to be able
to build with different random number providers. This requires that each
provider implements the same interface. Take the current single provider
and move it to a separate source file that we use directly. As other
providers are added this should be conditionally built.

Signed-off-by: Marcus Karlsson <mk@acc.umu.se>