Added TMP_ALLOC and used it in precomputed inverse functions in mpn_extras.