improve constant prop in gcd (#41258)
With this PR:
```julia
julia> f(x) = x * (2//3)
f (generic function with 1 method)
julia> @code_typed f(2.3)
CodeInfo(
1 ─ %1 = Base.mul_float(x, 0.6666666666666666)::Float64
└── return %1
) => Float64
```
It is a bit unfortunate to have to resort to `@pure` here, but I could
not get it to constant fold any other way. I don't think this usage
should be problematic since the method only accepts `BitInteger`s and
only ever calls methods that really shouldn't be redefined.
fixes #32024