Implement in-process PRNG for mkostemp

Instead of using /dev/urandom, use an in-process 32-bit xorshift.

The xorshift is a very fast but not particularly strong PRNG with a
period of (1- (expt 2 32)).  It has only a single 32-bit word for seed
data, so that multithreaded code should play very nicely on CPUs that
can store those atomically.  For CPUs that cannot, it should still be
safe, since it can recover from any value in the seed.

We reseed from the pid and current time when we hit a collision.  This
is necessary for code like this to not be slow:

    mkstemp(...)
    fork()
    mkstemp(...)

since the child process(es) will inherit the seed of the parent and
collide a lot otherwise.