Improvements to inequality solving

fixes #8206 (please feel free to any others that are related that also work with these changes)
fixes #8518
I'm not so sure about this change.  For me, it seems `solve_univariate_inequality` - a heuristics, but `reduce_rational_inequalities` is a robust procedure, based on sympy.polys algorithms.