Use the threaded version of random number generator
Merge pull request #2403 from aburgm/random-threaded

Multithreading fixes -- Use the threaded version of random number generator