Make small primes faster.

Big improvement is shrinking the bit vector to the right size.
Other improvements include full fixnum arithmetic and less mutation.