Refactor processing of inequalities with oo

fixes #7775
fixes #7798
fixes #7841

this patch replaces #7800 and #7799
> And you are sure we will never do that in the future?

Very unlikely.

I'm thinking if we can now remove this code.