This improves a few minor issues with the RNG code:
- Avoid calling
GetRand*()functions (which currently invoke OpenSSL, later may switch to using our own RNG pool) inside loops in addrman, networking code,KnapsackSolver, andLimitOrphanSize - Fix a currently unreachable bug in
FastRandomContext::randbytes. - Make a number of simplifications to the unit tests’ randomness code (some tests unnecessarily used their own RNG or the OpenSSL one, instead of using the unit test specific
insecure_rand_ctx). - As a precaution, make it illegal to copy a
FastRandomContext.