Show that init_session() runs init_printing()
polyroots: always refine all roots

Previously if the given root was already converged, it wasn't refined. But this
seems to increase the number of iterations needed to converge considerably.
polyroots: Raise error if convergence not achieved
polyroots: chop small numbers in "cleanup" mode

Previously only small real or imaginary parts were chopped. But if abs(x) is
close to zero, we want to chop this case as well.
polyroots: use `extraprec` argument

Previously this argument was not used at all by a mistake and instead the
default value 10 was assigned directly.
polyroots: fix tolerance calculation

We now set the tolerance `tol` directly equal to `ctx.eps`. This is the right
way to do it, since if more working precision is needed, the user needs to
assign the `extraprec` argument.
Refactor nroots() to make it more robust

The following changes were made:

* The polynomial coefficients are always converted to integers. Previously, a
  floating point number was used instead, which loses accuracy, and then for
  higher order polynomials (e.g. Legendre of order 64) one has to use large
  working precision just to represent polynomial coefficients accurately
  enough (otherwise one gets inaccurate roots, for example complex roots
  solution instead of real ones). Now this problem is completely avoided.

* We set extra precision in polyroots() based on the polynomial order.
  "10*order" seem to work well. This formula can be adjusted. This takes care
  of the problem that higher order polynomials suffer from numerical
  cancellation.

* We remove the `error` argument. Now the error is always either lower than `n`
  digits, or an exception is raised.

* The roots are now ordered by mpmath, which returns the correct ordering (real
  roots first, then complex ones).
Add tests for nroots()

We test roots of Legendre polynomial of order 64, as well as some smaller
polynomials. Besides accuracy, these tests also ensure the proper ordering of
the roots.
polyroots: use NoConvergence instead of Exception

A test written as well.
Add a note to tests about the roots order
new assumptions for inverse trig functions
fixes pyglet doctest problems

fixes TypeError and KeyError exceptions in the pygletplot package

    Traceback (most recent call last):
      File "/usr/lib64/python2.7/doctest.py", line 1289, in __run
        compileflags, 1) in test.globs
      File "<doctest sympy.plotting.pygletplot.__init__.PygletPlot[29]>", line 1, in <module>
        p[2] = -x**2-y**2
      File "sympy/plotting/pygletplot/plot.py", line 320, in __setitem__
        f = PlotMode(*args, **kwargs)
      File "sympy/plotting/pygletplot/plot_mode_base.py", line 164, in __init__
        self.style = self.options.pop('style', '')
      File "sympy/plotting/pygletplot/plot_mode_base.py", line 174, in w
        r = f(self, *args, **kwargs)
      File "sympy/plotting/pygletplot/plot_mode_base.py", line 327, in _set_style
        v = ['both', 'solid'][step_max > 40]
    TypeError: list indices must be integers, not BooleanFalse

    Traceback (most recent call last):
      File "/usr/lib64/python2.7/doctest.py", line 1289, in __run
        compileflags, 1) in test.globs
      File "<doctest sympy.plotting.pygletplot.__init__.PygletPlot[30]>", line 1, in <module>
        p[2].style = 'wireframe'
      File "sympy/plotting/pygletplot/plot.py", line 301, in __getitem__
        return self._functions[i]
    KeyError: 2

Signed-off-by: Thomas Hisch <t.hisch@gmail.com>
remove redundant condtion

We already know that radicals is True since the preceding line
returned if `not radicals` was True.
old assumptions for inverse trig functions
A minor change in tests for new assumptions
Port changes from mpmath
Update tests: nroots does not take the error arg

Instead it raises an exception if the root is not converged.
Put back the original ordering

This is required by tests like the following:

    f = 7*z**4 - 19*z**3 + 20*z**2 + 17*z + 20

    assert intervals(f) == []

    real_part, complex_part = intervals(f, all=True, sqf=True)

    assert real_part == []
    assert all(re(a) < re(r) < re(b) and im(
        a) < im(r) < im(b) for (a, b), r in zip(complex_part, nroots(f)))

For now, we do not want to modify the symbolic algorithms in intervals(), so we
returned to the original ordering. We documented this in the relevant parts of
the code and tests.
Make the coefficients working for other fields

This just replicates the logic that was used there before for such fields.
doctests: fix problem with decorators

supersedes #7399

with this commit all decorated functions/methods containing doctests,
where the used decorator is != ``property`` are executed now and not
silently skipped.
runtests.py: it is safe to remove 'except ValueError' in finder

Signed-off-by: Thomas Hisch <t.hisch@gmail.com>