primes: Use a faster composite check.