tweak algorithm to actually fast-track zero-pages

Also significantly speed up replicateBits for single bit pattern case.