solver: avoid the use of the same prng
solver: avoid the use of the same prng

This patch moves the prng from top function into functor. Now, each
thread uses local prng.

quesnel/baryonyx,quesnel/baryonyx,quesnel/baryonyx