Refactor processing of inequalities with oo/-oo, fixes #7775

We need to make sure to add a test for this logic if it's not already there: that "other.is_complex and other.is_real is False" should catch `other = I` and `other = 2 + I` or, symbolically, `var('y', imaginary=True)` and `var('y', complex=True, real=False)`.