Use testing_rng() in all unit tests.
This branch builds on !561 (merged), and uses the testing_rng()
function in all tests. The first commit changes thread_rng()
in all tests; subsequent commits are cleanup and refinement.
Edited by Nick Mathewson