Improve quickrand and cpg random number usage.