mpir_fermat_to_mpz, random_fermat => mpir_random_fermat. Moved fft protos to gmp-impl.h.
Add const to declarations where necessary