Catch ValueError in _eval_is_positive/negative

See issue 4066. Sometimes evalf raises ValueError, such as at poles of the
gamma function.