random: Add a feature to close device file descriptors.