Added test for parallel axis in mechanics

Turned off the warning message for parallel axis in kane.py and wrote a
test for the parallel axis theorem for an inverted pendulum on a cart.
Addressing issues brought up in PR 1213
Edited some text for PR 1213
Add rational simplification modulo a prime ideal

ratsimpmodprime computes a representation of a ratioanl expression `a/b`
such that the sum of the total degree of the numerator and denominator
is minimized. E.g.:

>>> ratsimpmodprime((x+y**5+y)/(x-y), [x*y**5-x-y], x, y, order="lex")
(x**2 + x*y + x + y)/(x**2 - x*y)

Which means that (x+y**5+y) * (x**2-x*y) is congruent to (x-y) *
(x**2+x*y+x+y) modulo the ideal generated by x*y**5-x-y.

The basic description of the algorithm is as follows: c/d = a/b mod G if
and only if a*d - b*c = 0 mod G. So try all polynomials c, d with total
degree less than the total degrees of a and b respectively.
The coefficients of c and d are indeterminates and thus the coefficients
of the reduction of a*d - b*c are linear polynomials in the
indeterminates. The coefficients, thought as a system of linear
equations, can be solved and if they have nontrivial solutions, a
simpler representation of a/b is found.
Afterwards it tries to lower the total degree of the numerator and
denominator recursively and returns the result.
Add tests for ratsimpmodprime

Conflicts:

	sympy/simplify/tests/test_simplify.py
Rewrite staircase, improve docstrings
Use Polys instead of exprs in reduced
Return expr if polification fails
Remove cancel in ratsimpmodprime
In staircase, fix the creation of a monomial from a tuple.
Update the docstring of ratsimpmodprime.

State that ratsimpmodprime requires a Groebner basis of the ideal.
Also test ratsimpmodprime with a non-principal prime ideal.
gcd_terms and cse iterable handling adjusted

    cse does not try to identify common iterables, only expressions
    within the iterables

    gcd_terms is made to take an iterable of terms or an Expr;
    If it receives a Basic that is not an Expr it will just process the
    args independently, not interpret, e.g. a Tuple as containing terms.
sign(nonzero real)**even -> 1
Merge pull request #1244 from smichr/sign

Sign(non-zero real)**even simplifies to 1
Merge pull request #1243 from smichr/cse

gcd_terms and cse iterable handling adjusted
Merge pull request #1237 from scolobb/ratsimp4

Rebased https://github.com/sympy/sympy/pull/563
2846:integral.transform now allow change to a different variable
allow more transformations in Integral.transform
rework error conditions

>>> I=Integral
>>> i=I(x*(x**2+5)**75)
>>> i.transform(x**2+5,u)
Integral(u**75/2, u)
>>> i=I(sqrt(x)/(1+root(x,3)),(x,0,64))
>>> i.transform(x,u**6)
Integral(6*u**5*sqrt(u**6)/((u**6)**(1/3) + 1), (u, 0, 2))
>>> I(sqrt(x)/(1+root(x,4)**3)).transform(x,u**8)
Integral(8*u**7*sqrt(u**8)/((u**8)**(3/4) + 1), u)
>>> I(x*sqrt(x+1)).transform(sqrt(x+1),u)
Integral(2*u*(u**2 - 1)*sqrt(u**2), u)
>>> I(x*exp(asin(x))).transform(exp(asin(x)),u)
Integral(exp(asin(sin(log(u))))*sin(log(u))*cos(log(u))/u, u)
>>> I(x*exp(asin(x))).transform((asin(x)),u)
Integral(exp(asin(sin(u)))*sin(u)*cos(u), u)
>>> var('u',positive=True)
u
>>> I(x*exp(asin(x))).transform((asin(x)),u)
Integral(exp(asin(sin(u)))*sin(u)*cos(u), u)