utils: fix seeding of the random generator

If the fread didn't read all in one go, the buffer was being repeatedly
overwritten from the start instead of continuing the read :-/
I also changed the overall approach in some respects.
5 jobs for <span class="ref-name">rand_uint</span> in 1 minute and 57 seconds (queued for 1 second)
Status Job ID Name Coverage
  Build
canceled #73052
docker linux amd64
build:linux:amd64

passed #31719
docker linux amd64
build:linux:amd64

00:00:23

 
  Test
passed #31721
docker linux amd64
deckard:linux:amd64

00:00:30

passed #31722
docker linux amd64
respdiff:linux:amd64

00:01:56

passed #31720
docker linux amd64
test:linux:amd64

00:00:19