7594: factor(sqrt(x**2)) != x

logic in factor allowed sqrt(x**2) to become x. This has now been removed.
This breaks some trig manual_integrate results that are fixed in the next
commit.

In keeping with similar simplifications that are made to
spherical harmonic functions (sqrt(sin(theta)**2) -> sin(theta) because
of the assumed range of theta which makes sin(theta) positive), the
pattern sqrt(1-cos(theta)**2) is replaced with the simpler sin(theta),
too.
Impose domain restrictions in trig sub integrals
remove positive kernel check from powdenest

It is not always true that (p**x)**y = p**(x*y) if p is positive.
It depends on the value of x. e.g.
>>> e = 3 + I
>>> r = Rational(1, 3)
>>> b = .02
>>> ((b**e).n()**r).n(2)
0.014 + 0.014*I
>>> (b**(e*r)).n(2)
0.0053 - 0.019*I
consolidate _eval_power processing from exp into Pow

The two routines should almost be the same but they weren't. Now
exp (except for some special cases as a function) defers to Pow's
version of _eval_power. Some slight differences are now seen in
test results.
consolidate exp._eval_subs processing into Pow._eval_subs

The logic for _eval_subs has been consolidated as much as possible
between exp and Pow. There were things that the one was doing that
the other was not. In addition, the decision about whether to make
a certain substitution or not is more limited in scope: one should
not obtain an expression which is not supported by the power laws.

e.g. exp(2*x).subs(exp(x),y) -> y**2 but if the exp(x) is exp(3*x)
then the substitution will fail since exp(x)**(2/3) != exp(2*x/3).