/dev/random: style changes and use MutexLocker.