Use a random number generator that we know is predictable.

The previous version used drand48 which is not thread-safe and whose
implementation can, at least in principle, be different on different
systems. The new version is more predictable, using a member variable
and a known random number generator from the BOOST library.