8247: use minpoly in Expr.is_positive|negative

Only attempt this test if self is algebraic
with hopes that the test will then be successful and fast. There
are cases where something passed the is_algebraic test but still
raised the NotAlgebraic error in minpoly:

sympy/integrals/transforms.py", line 1818, in
sympy.integrals.transforms.inverse_hankel_transform
Failed example:
    inverse_hankel_transform(ht, k, r, 0)
    Exception raised:
        Traceback (most recent call last):
        ...
    NotAlgebraic: exp_polar(0) doesn't seem to be an algebraic element

See also issue 8349.

Watch for NotImplementedError from minpoly, too.