Cleaned up mess with 'include' keyword in sympy.polys

This is first step to disallow passing keyword arguments from
user level to low-level algorithms. In this patch 'include'
keyword was removed and new functions d*p_factor_list_include()
and d*p_sqf_list_include() added. One can still pass 'include'
to factor_list() and sqf_list() on the user level, but it won't
be propagated via **args but via calls of appropriate functions.

Basically, if keyword (on the low-level) made a function to return
different structure of a result than without this keyword, then a
new function will be added to simplify thing. If a keyword isn't
introducing structural changes then it will be propagated via
explicit argument. This verbose approach should make sympy.polys
understandable more easily.
Implemented configuration framework for polys module

Previously there were two methods used for configuring what
algorithms should be used and how they will perform:

1. Passing keyword arguments around.
2. Setting up global variables.

Now there is only one configuration approach, via polyconfig.

Consider the following example:

In [1]: from sympy.polys.polyconfig import query, setup

In [2]: query("USE_CYCLOTOMIC_FACTOR")
Out[2]: True

In [3]: %time u = factor(x**100 - 1)
CPU times: user 0.04 s, sys: 0.00 s, total: 0.04 s
Wall time: 0.05 s

In [5]: setup("USE_CYCLOTOMIC_FACTOR", False)

In [6]: %time u = factor(x**100 - 1)
CPU times: user 2.66 s, sys: 0.01 s, total: 2.66 s
Wall time: 2.75 s

In [8]: setup("USE_CYCLOTOMIC_FACTOR")

In [9]: %time u = factor(x**100 - 1)
CPU times: user 0.05 s, sys: 0.00 s, total: 0.05 s
Wall time: 0.05 s

This way several low-level algorithms can be configured and, for
example, benchmarking or algorithm parameters optimization was
made a lot easier.
Allow Poly(Poly(x), field=True) convenient shorthand
Fixed root_factors() to work with non-trivial cases
Added test for solve_polynomial_system() (#1863)
Reimplemented ratsimp() in terms of cancel() and reduced()

Previously ratsimp() was redundant and did what cancel() do, but
much slower. Now ratsimp() uses cancel() to reduce the degree of
a rational function and applies reduced() to the resulting numerator
and denominator to split a rational function into polynomial part
and rational function part, often given results much simpler and
cancel() alone.

Example:

In [1]: (x+x*z+y*z)/(x+y)
Out[1]:
x + x⋅z + y⋅z
─────────────
    x + y

In [2]: cancel(_1)
Out[2]:
x + x⋅z + y⋅z
─────────────
    x + y

In [3]: ratsimp(_1)
Out[3]:
          y
1 + z - ─────
        x + y

In [4]: cancel(_3)
Out[4]:
x + x⋅z + y⋅z
─────────────
    x + y

In [5]: together(_3)
Out[5]:
x + z⋅(x + y)
─────────────
    x + y
Improved polyconfig.py and use config in galoistools.py
Trivial improvement to doc/src/modules/polys/wester.txt
Use gmpy by default in polys and show types at init

Previously the default ground types were Python's int and Fraction
types (or SymPy's Rational on 2.4 / 2.5). The new default is gmpy,
if gmpy is available. If not SymPy will fallback to slower types
as previously.

To cut down on confusion what ground types are being used in a
particular session, the information about ground types that were
setup is now displayed in the welcome message in isympy. The text
is in a form: "types: something" (as it is done with cache).

If SymPy was able to use the same types for both ZZ and QQ domains,
then 'something' will be set to 'gmpy', 'python' or 'sympy'. If this
is not the case, e.g. in 2.4 w/o gmpy, then SymPy uses mixed ground
types and 'something' will be in a form: "ZZ_type/QQ_type". In the
example given it would be "types: python/sympy", i.e. ZZ.dtype is
int and QQ.dtype is Rational.

Examples:

1. Python 2.6 with gmpy

$ python2.6 bin/isympy -q
IPython console for SymPy 0.6.7-git (Python 2.6.2) (types: gmpy)

2. Python 2.6 w/o gmpy

$ SYMPY_GROUND_TYPES=python python2.6 bin/isympy -q
IPython console for SymPy 0.6.7-git (Python 2.6.2) (types: python)

3. Python 2.4 w/o gmpy

$ python2.4 bin/isympy -q
Python console for SymPy 0.6.7-git (Python 2.4.4) (types: python/sympy)
Use Poly(..., sort="x > y") to resemble math notation
Refactored real root isolation, restored Cython support
Added test for factor(y/pi + y*sin(x)/pi) (#783)
Added test for huge Sturm sequence example (#326)
Added test for parsing sin(x), cos(x) in polys (#1355)
Clenead up situation with automatic domain conversion

In [1]: monic(2*x**2 + 3*x + 4)
Out[1]:
    3⋅x    2
2 + ─── + x
     2

In [2]: monic(2*x**2 + 3*x + 4, auto=False)
...
ExactQuotientFailed: 2 does not divide 3 in ZZ

Also this now works:

In [3]: solve(x**2+x+1.0, x)
Out[3]: [-0.5 - 0.866025403784439⋅ⅈ, -0.5 + 0.866025403784439⋅ⅈ]

Note that for computing numerical roots of polynomials there
is nroots() function (which utilizes mpmath's solvers).
Renamed ground_to_ring() to clear_denoms()
Added test for issue 1432
Implemented gf_lcm() and gf_cofactors() (+ toplevel)

In [1]: f = x**2 + 8*x + 7

In [2]: g = x**3 + 7*x**2 + x + 7

In [3]: cofactors(f, g, modulus=11)
Out[3]:
⎛                    2⎞
⎝-4 + x, 1 + x, 1 + x ⎠

In [4]: lcm(f, g, modulus=11)
Out[4]:
              2      3    4
-4 - 3⋅x - 3⋅x  - 3⋅x  + x

In [5]: cofactors(f, g, modulus=11, symmetric=False)
Out[5]:
⎛                   2⎞
⎝7 + x, 1 + x, 1 + x ⎠

In [6]: lcm(f, g, modulus=11, symmetric=False)
Out[6]:
             2      3    4
7 + 8⋅x + 8⋅x  + 8⋅x  + x
Improved real root isolation, faster and more tools

In [1]: intervals(x**2 - 2)
Out[1]: [((-2, -1), 1), ((1, 2), 1)]

In [2]: intervals(x**2 - 2, eps=S(1)/100)
Out[2]:
⎡⎛⎛  17    24⎞   ⎞  ⎛⎛24  17⎞   ⎞⎤
⎢⎜⎜- ──, - ──⎟, 1⎟, ⎜⎜──, ──⎟, 1⎟⎥
⎣⎝⎝  12    17⎠   ⎠  ⎝⎝17  12⎠   ⎠⎦

In [3]: intervals(x**2 - 2, eps=1e-2)
Out[3]:
⎡⎛⎛  17    24⎞   ⎞  ⎛⎛24  17⎞   ⎞⎤
⎢⎜⎜- ──, - ──⎟, 1⎟, ⎜⎜──, ──⎟, 1⎟⎥
⎣⎝⎝  12    17⎠   ⎠  ⎝⎝17  12⎠   ⎠⎦

In [4]: Poly(x**2 - 2).refine_root(1, 2, eps=S(1)/10000)
Out[4]:
⎛239  99⎞
⎜───, ──⎟
⎝169  70⎠

In [5]: Poly(x**2 - 2).refine_root(1, 2, steps=10)
Out[5]:
⎛140  99⎞
⎜───, ──⎟
⎝ 99  70⎠

In [6]: Poly(x**2 - 2).refine_root(1, 2, steps=15)
Out[6]:
⎛1393  577⎞
⎜────, ───⎟
⎝985   408⎠

In [7]: intervals([x**5 - 200, x**5 - 201])
Out[7]:
⎡⎛⎛75  101⎞        ⎞  ⎛⎛283      ⎞        ⎞⎤
⎢⎜⎜──, ───⎟, {0: 1}⎟, ⎜⎜───, 26/9⎟, {1: 1}⎟⎥
⎣⎝⎝26   35⎠        ⎠  ⎝⎝ 98      ⎠        ⎠⎦
Added 'inf' and 'sup' keywords to intervals()

Consider polynomial x**2 - 2:

In [1]: intervals(x**2 - 2)
Out[1]: [((-2, -1), 1), ((1, 2), 1)]

We got two real roots on (-oo, oo). We can find isolating
intervals on a smaller domain, e.g.:

In [2]: intervals(x**2 - 2, inf=1)
Out[2]: [((1, 2), 1)]

In [3]: intervals(x**2 - 2, sup=1)
Out[3]: [((-2, -1), 1)]

If the infimum or the supremum is inside of any of the disjoint
isolating intervals, each such interval is refined until a True/
False answer can be given to a question if those intervals should
be discarded or not, e.g.:

In [4]: intervals(x**2 - 2, inf=S(7)/5)
Out[4]: [((7/5, 3/2), 1)]

Strict inequalities are used for 'inf' and 'sup', e.g.:

In [5]: intervals(x - 1, inf=1)
Out[5]: [((1, 1), 1)]

In [6]: intervals(x - 1, sup=1)
Out[6]: [((1, 1), 1)]

In [7]: intervals(x - 1, inf=1, sup=1)
Out[7]: [((1, 1), 1)]