Improve ecm
Check `ret_val` instead of `i`
Stop trying to factor using `ecm` when `n` is a probable prime
Merge pull request #106 from certik/improve_ecm

Improve ecm