Changed is_prime_long (). The caller must decide between Miller-Rabin and divisor checking
as mod_pow overflows when mod - 1 > sqrt (LONG_MAX), well below MILLER_RABIN_DETERMINISTIC_LIMIT