Update isfinite for complex to avoid overflow
Fixes: https://github.com/pytorch/pytorch/issues/66402
`abs` is larger than both real and imag, therefore, it could overflow, that is, both real and imag are finite, but abs are infinite. We should avoid this case. See also https://github.com/pytorch/pytorch/pull/76598/files#r862257429
Pull Request resolved: https://github.com/pytorch/pytorch/pull/76606
Approved by: https://github.com/ngimel, https://github.com/mruberry