onion_random_init/onion_random_free thread-safe

If libonion is compiled with pthreads enabled, onion_random_init and
oniom_random_free are thread safe.