Move random_number_generator into namespace random, tweak the implementation a bit, and add a test case.