Wrap *rand.Rand in a mutex-protected SafeRand type to make the global RNG safe for concurrent use across goroutines. The previous bare *rand.Rand caused data races detected by go test -race.
common