Reduce some GMP memory leaks using explicit frees.

Call delete on BigInt (class) instances to release them.

Call mpz_clear() on mpz_t instances to release them.