Add support for pre-seeded RNGs in unit tests
From discussion on !536 (merged), it seems that it would be a good idea to have the ability to disable most/all use of real RNGs in our unit tests for reproducibility. This should probably be configurable from an environment variable. Tor has a similar feature.
I have reasonably strong opinions on how to do this, so I'll assign to myself. :)