Reformat the Basic.rewrite docstring

Better indentation and additional explanatory doctests.
[solvers] implement minsolve_linear_system.
[simplify] Improvements to ratsimpmodprime.

Namely:

- fix a bug where denominators would be dropped
- add a parameter quick, and use solve(.., minimal=True, quick=True)
- if quick is not True, collect all solutions of the minimal total degree (but
  differing individual degrees) and use minsolve_linear(quick=False) to find
  the best
- make staircase() much more efficient
[functions/elementary] Implement cosh(x+y) sinh(x+y) expansion.
[polys] Fix eject().

Note that the changes in densebasic are most easily tested through the
polytools wrapper classes.
[simplify] Start trigsimp_groebner.

This is a function which simplifies trigonometric and hyperbolic fraction using
the groebner basis based algorithm ratsimpmodprime.
[simplify/trigsimp_groebner] Implement polynomial simplification.

This is a faster, but less good version. Also speed up some tests.
Better integration of trigsimp_groebner with rest of trigsimp.
[simplify] Implement "deep" for trigsimp with groebner.
first draft 1dSHO
Modified: SPHINX DOCUMENTATION.
Added functionality to Q.real and Q.imaginary and fixed issue:2324

>>> ask(Q.real(x**3),Q.imaginary(x)&Q.real(2))
False
>>> ask(Q.real(x**2),Q.imaginary(x)&Q.real(2))
True
>>> ask(Q.imaginary(x**3),Q.imaginary(x)&Q.real(2))
True
>>> ask(Q.imaginary(x**2),Q.imaginary(x)&Q.real(2))
False
>>> ask(Q.real(x**y),Q.imaginary(x)&Q.imaginary(y))
True
>>> ask(Q.real(x**3),Q.imaginary(x)&Q.real(3))
False
>>> ask(Q.imaginary(x**(3*y)),Q.imaginary(x)&Q.imaginary(y))
False
>>> ask(Q.imaginary((x*2)**(3*y)),Q.imaginary(x)&Q.imaginary(y))
False
>>> ask(Q.imaginary(x**y),Q.imaginary(x)&Q.imaginary(y))
False
>>> ask(Q.imaginary(I**y),True and Q.imaginary(y))
False

probably a fix to the issue:2324
Added functionality to Q.real and Q.imaginary and fixed issue:2324

>>> ask(Q.real(x**3),Q.imaginary(x)&Q.real(2))
False
>>> ask(Q.real(x**2),Q.imaginary(x)&Q.real(2))
True
>>> ask(Q.imaginary(x**3),Q.imaginary(x)&Q.real(2))
True
>>> ask(Q.imaginary(x**2),Q.imaginary(x)&Q.real(2))
False
>>> ask(Q.real(x**y),Q.imaginary(x)&Q.imaginary(y))
True
>>> ask(Q.real(x**3),Q.imaginary(x)&Q.real(3))
False
>>> ask(Q.imaginary(x**(3*y)),Q.imaginary(x)&Q.imaginary(y))
False
>>> ask(Q.imaginary((x*2)**(3*y)),Q.imaginary(x)&Q.imaginary(y))
False
>>> ask(Q.imaginary(x**y),Q.imaginary(x)&Q.imaginary(y))
False
>>> ask(Q.imaginary(I**y),True and Q.imaginary(y))
False

probably a fix to the issue:2324
Added comparions to tuples

>>> Tuple(1,3)>=Tuple(-10,30)
True
>>> Tuple(1,3)<=Tuple(-10,30)
False
>>>
Added functionality to Q.real and Q.imaginary and fixed issue:2324

>>> ask(Q.real(x**3),Q.imaginary(x)&Q.real(2))
False
>>> ask(Q.real(x**2),Q.imaginary(x)&Q.real(2))
True
>>> ask(Q.imaginary(x**3),Q.imaginary(x)&Q.real(2))
True
>>> ask(Q.imaginary(x**2),Q.imaginary(x)&Q.real(2))
False
>>> ask(Q.real(x**y),Q.imaginary(x)&Q.imaginary(y))
True
>>> ask(Q.real(x**3),Q.imaginary(x)&Q.real(3))
False
>>> ask(Q.imaginary(x**(3*y)),Q.imaginary(x)&Q.imaginary(y))
False
>>> ask(Q.imaginary((x*2)**(3*y)),Q.imaginary(x)&Q.imaginary(y))
False
>>> ask(Q.imaginary(x**y),Q.imaginary(x)&Q.imaginary(y))
False
>>> ask(Q.imaginary(I**y),True and Q.imaginary(y))
False

probably a fix to the issue:2324
Added functionality to Q.real and Q.imaginary and fixed issue:2324

>>> ask(Q.real(x**3),Q.imaginary(x)&Q.real(2))
False
>>> ask(Q.real(x**2),Q.imaginary(x)&Q.real(2))
True
>>> ask(Q.imaginary(x**3),Q.imaginary(x)&Q.real(2))
True
>>> ask(Q.imaginary(x**2),Q.imaginary(x)&Q.real(2))
False
>>> ask(Q.real(x**y),Q.imaginary(x)&Q.imaginary(y))
True
>>> ask(Q.real(x**3),Q.imaginary(x)&Q.real(3))
False
>>> ask(Q.imaginary(x**(3*y)),Q.imaginary(x)&Q.imaginary(y))
False
>>> ask(Q.imaginary((x*2)**(3*y)),Q.imaginary(x)&Q.imaginary(y))
False
>>> ask(Q.imaginary(x**y),Q.imaginary(x)&Q.imaginary(y))
False
>>> ask(Q.imaginary(I**y),True and Q.imaginary(y))
False

probably a fix to the issue:2324
updated
Updated tests
Corrected spelling
Merge branch 'master' of git://github.com/sympy/sympy into sachin1

Conflicts:
	sympy/assumptions/handlers/sets.py
	sympy/assumptions/tests/test_query.py