Add rnd mutex

Apparently unprotected access to custom rand.Rand objects can cause panics

See: https://github.com/golang/go/issues/3611