faster BigInt hashing (fix #8727)

`sizeinbase` from gmp is exact for powers of two, so the checks (in `ndigits0z`) are not needed.