tests: Generate random values in unsigned integer space

When we're doing bitwise operations, addition with wraparound and
large left-shifts, it seems safer to use unsigned integers, where
the effect of overflow is well-defined (it wraps around). Signed
integer overflow is undefined behaviour, so compilers are free to
optimize by assuming that it cannot happen.

Detected by the undefined behaviour sanitizer (UBSan).

Signed-off-by: Simon McVittie <smcv@collabora.com>
12 jobs for test-random-ints in 14 minutes and 18 seconds (queued for 60 minutes and 4 seconds)
Status Job ID Name Coverage
  Build
passed #45775
build:cmake

00:06:09

passed #45772
build:debug

00:08:48

manual #45777
allowed to fail manual
build:i686-w64-mingw32-cmake
passed #45776
build:i686-w64-mingw32-debug

00:06:57

manual #45780
allowed to fail manual
build:jessie
manual #45774
allowed to fail manual
build:legacy
passed #45771
build:production

00:07:14

manual #45773
allowed to fail manual
build:reduced
manual #45782
allowed to fail manual
build:trusty
passed #45778
build:x86_64-w64-mingw32

00:07:01

manual #45779
allowed to fail manual
build:x86_64-w64-mingw32-cmake-debug
manual #45781
allowed to fail manual
build:xenial