Refactor processing of inequalities with oo (ver 2)

fixes #7775
fixes #7798
fixes #7841

This is a slightly different version of #7861.  Different fixes
for the quantum module (only single broken test here).

@mattcurry , @ellisonbg - can someone review the quantum stuff?  For the rest I have +1 from @smichr.
@smichr, this test is "broken".