configure.ac: Allow overrides for GMP CFLAGS/LIBS

This also clears up the use of GMP_CFLAGS/GMP_LIBS in Makefile.am.