add a random bool helper
introduce some routines to return single bits.
add an extra short circuit if 0
introduce rand32

to be used in places instead of rand(), to stress the single-bit cases some.
(later, I'll bias it so that rand() is what gets called most the time)