Add simple trial division to is_mersenne_prime