ispow2: much more efficient implementationon modern machines.

The other approach was useful for old systems that didn't have any
popcnt instruction, but modern CPUs – in particular x86 – have it.
This is also much faster for BigInts since it can be computed with-
out creating any new BigInt objects.