libc: take rand() and rand_r() from musl

Replace our own libc/prng/rand.c by musl's rand.c and rand_r.c.

In addition to adopting more unmodified musl, this patch also improves
two problems in our existing code:

First, we copied rand_r() from an old version of Musl, which didn't
include this improvement of rand_r()'s quality:
http://git.musl-libc.org/cgit/musl/commit/?id=20d01d83b5a13c77805976e7c520f566244ba3ff

Second, our code built rand() on top of rand_r(). This sounds like a
good idea, but in reality we can achieve better quality for rand() by
not being constrained (like rand_r()) to a 32-bit key.  Musl's version
uses a 64-bit key and returns the 32 high-order bits, which in linear
congruential generators provide better quality random numbers.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>