This will only happen for primes --- but those we will check before
hand and exit early, so if it found a trivial factor here, it means
we need to call ecm_factor() again until it finds a non-trivial
factor. Only after 10 iterations or so, we raise an exception that
ECM failed.