faster gcd

Average speedup for random inputs ranges from ~~20%~~ 8% (Int8) to 70% (Int64).