Better RNG for crypto key generation.

New code gives the user a choice from /dev/urandom, /dev/random, rand(),
and Mersenne Twister (mt_rand).