add BigInt prevpow2/nextpow2 (fix #4814)

Implemented in terms of `ndigits(2,x)`, which is documented to give the most-significant-bit in GMP.