Random number generator

Added a random number generator that tries to use the best available rng