Improve relational

fixes #8206 (please feel free to any others that are related that also work with these changes)
fixes #6463 - I just let polys do as it likes but make sure that the properties requested are right

Why isn't it necessary to sort when `poly` is `True`?

We should raise an error if the expression is not a rational function because in that case `solve` might not return all the solutions and that will lead to wrong results. An example can be
```
In [19]: solve_univariate_inequality(sin(x) > 0, x)
Out[19]: And(0 < x, x < pi)
```