prevent data races when initializing the workers PRNG seeds
Each worker currently calls uniformIntDistribution(randomEngine) which modifies the randomEngine internally and thus produces data races when the threads run in parallel.
This change calls uniformIntDistribution(randomEngine) on the main thread for each worker and passes the resulting seeds to the workerLoop.
The data race was found by gcc's and clang's tsan.
Edited by Maxim Onciul