Speedup for large composites in is_prob_prime