gmp: modernize
gmp: add test
mpfr: modernize
mpfr: add test
mpfi: modernize
mpfi: add test

Closes #35313.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>