make gcdx type-stable & 20x faster, fix invmod to work with negative arguments, use GMP for BigInt invmod
make gcd and lcm positive (fix #4810)
update gcd/lcm/gcdx docs
ensure consistent results for gcdx(0,0) with BigInt
bugfix for lcm(0,0), add test coverage of gcd-related functions
Merge pull request #4811 from stevengj/invmod

fix gcd & lcm sign and optimize gcdx and invmod