std::rand::OsRng: Use `getrandom` syscall on Linux

`getrandom(2)` system call [1] has been added on Linux 3.17.
This patch makes `OsRng` use `getrandom` if available, and use
traditional `/dev/urandom` fallback if not.

[1]:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c6e9d6f38894798696f23c8084ca7edbf16ee895

Fixes #17922.
Instead of using inline assembly, could this use the `extern_weak` trick that [`__pthread_get_minstack` uses](https://github.com/rust-lang/rust/blob/77f44d4a7bf14805fda5fc41310a6aeffda30fd4/src/librustrt/thread.rs#L472-L483)?