Simplify get_curve_from_param[13] with mpz_invert
I verified this matches conceptually and in a few cases + the test (which slightly exercise this). I didn't verify on a 32 bit machine but I believe it should work because mpz_invert isn't dependant on machine size the way the old code was.