fix a warning message

on some machines a thread t is an int, so t=NULL is wrong
stop retaining pari state between uses

Pari sets gmp's memory allocation functions to functions of its
own choosing, and provides a way to restore the old ones upon exit.
Formerly we were preventing Pari from doing that by building mpir
and patching it so it ignores Pari.  Now instead we call the pari-
closing routine after each use to restore the old memory allocation
functions (GC_malloc, etc.)