math/mprand.[ch], rand/grand.c: Check range of arguments.
* mprand: It doesn't make sense to ask for a zero-bit integer whose
low bit is set; or, indeed, a four-bit integer whose fourth bit is
set. So check the mask against the bit length.
* mprand: On the other hand, it /does/ make sense to ask for a
zero-bit integer, and the answer is simply zero. But the code used
to segfault. Fix this.
* mprand_range, grand_defaultrange: It doesn't make sense to ask for
an integer in [0, 0), because there aren't any. Check before
trying.