Isolate createUniqueId randomness from rest of R

TODO: Generalize to our own runif

Reviewed by @jmcphers