Improve speed of `ndigits0z(::BigInt)` using logarithms (#8743).

It's difficult to say how often this will help, as it depends on the numbers you're dealing with, but if the numbers satisfy a scale invariance (similar to [Benford's law](http://en.wikipedia.org/wiki/Benford's_law)), the probability of taking the "fast" option should be `1-1/log2(b)` (70% for Base 10).
Should both of the comparisons be `<=`?