Improvements to inequality solving

fixes #8206 (please feel free to any others that are related that also work with these changes)
fixes #8518
Yes (though this change could be made independent of making them real). But making x real allows one to solve, for example, sqrt(x**2) > 1 as abs(x) > 1 by making x real and letting the inequality impose the restriction on x being real.