Improve performance of is_prime() #6

We can speed up is_prime() for numbers which contain small factors (<=53) by using
the very fast GCD routine from GMP before bringing out the big guns.

Thanks to @danaj for the suggestion.