random_seed.c: prefer getrandom() / /dev/{,u}random over arc4random()
arc4random(3) is problematic to use during early boot, as it (as implemented
by glibc or libbsd) uses getrandom(2) without the GRND_NONBLOCK flag,
causing it to block until the kernel entropy pool is initialized, which may
take a very long time.
One example of this is cryptsetup(8), which may be used for bringing up a
LUKS encrypted root filesystem during early boot.
So instead prefer getrandom(.., GRND_NONBLOCK) (which will fail before the
pool is initialized) and /dev/urandom (which will succeed, but cause the
kernel to print a warning about access before the pool is initialized)
before falling back to arc4random().
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>