use rc_random_vector() to generate the ID in a request

Also fixes handling of /dev/urandom errors and added support for getentropy().