Polynomial remainder sequences, gcd, and resultant

Documentation on the computation of gcd's and resultant's of
polynomials via remainder sequences, with emphasis on subresultants.
Computing resultant with subresultants

Reordered the loop in the computation of subresultants to include
one more scalar subresultant, namely, the resultant. Another loop
in the resultant function can then be omitted.

Notes:

1. The subresultants and the resultant of the pair `(f,g)` as computed
   are actually those of the pair `(g,f)` if `\deg(f) < \deg(g)`.
   This may have effect on the signs, but that is harmless in general
   when the resultant is only used for eliminating a variable.
   I have not changed this to save some time in the computation.
   Correct signs may be restored afterwards if that is necessary.

2. The resultant of `(f,0)` is zero indicating that `f` and `0` have
   common roots, namely every root of `f`. However, if `f` is a
   non-zero constant, it has no roots. In this case the resultant
   should be different from zero -- in fact one, by convention.
   I have not changed this as it would break the test in
   test_euclidtools.py.
product should return 1 if term=1, fixes #8301
doit() keeps unevaluated Product, if _eval_product returned nan
Improve _needs_mul_brackets: place brackets around Mul, if it starts from "-"

It's ok to omit brackets if this Mul is a first argument (of another Mul
instance).  fixes #8470
Merge pull request #8304 from skirpichev/8301-fix

product should return 1 if term=1
Merge pull request #8475 from skirpichev/8470-fix

Improve _needs_mul_brackets: place brackets around Mul, if it starts from "-"
Don't use evaluate kwarg for eval methods: fix catalan and euler functions

fixes #8496
Merge pull request #7526 from jksuom/subres

Computing resultant with subresultants
fix issue #8323

	harmonic(n).evalf() and catalan(n).evalf()
Implement Mod._eval_is_integer helper for assumptions

fixes #8486
Merge pull request #8498 from skirpichev/8496-fix

Don't use evaluate kwarg for eval methods: fix catalan and euler
Merge pull request #8371 from zanzibar7/evalf_harmonic_and_catalan

fix issue #8323
correct pep8
refine convert functions from atan2 to atan if the sign is defined
Merge pull request #8497 from skirpichev/8486-fix

Implement Mod._eval_is_integer helper for assumptions
Merge pull request #8484 from jfosorio/atan2_refine

New refine entry for the atan2 function