tree traversals take functional inputs

These functions define how to manipulate terms

new(op, *args) -> make a new term
children(term) -> list of args
op(term) -> type of term (e.g. Add, Mul)
leaf(term) -> boolean if the term is a leaf
Add Sphinx coverage testing to the coverage_doctest.py tool

This checks if the function is imported into Sphinx. This works by checking
the source from the Sphinx viewcode extension.

This fixes issue 2896.

I still need to add verbose output, and I also need to add some error checking
if the Sphinx docs haven't been built.
Change --no-color to --no-colors

--no-color will still work because OptionParser parses substrings.
Use brown instead of white, in case people have black on white terminals
Add a summary for sphinx

Our current scores are

TOTAL DOCTEST SCORE for sympy: 34% (1984 of 5682)
TOTAL SPHINX SCORE for sympy: 22% (1293 of 5682)

which are not very good.
Tweak colors for coverage_doctest

Sphinx is now printed in gray, so it stands out less.  If the coverage is less
than 50%, the percent is printed in a brighter red.
Fix computation of how many functions are imported into Sphinx

It was computing the inverse.  The actual total is

TOTAL SPHINX SCORE for sympy: 84% (4806 of 5682)

which is not too bad.
Fix coverage_doctest calculations again

The Sphinx percentages should hopefully now be correct.  Assuming they are,
then the actual Sphinx score is 39% (2241 of 5682).

Also start to factor out the colors, so they can more easily be added in
verbose mode.
COLORS!

For coverage_doctest.py -v. If the colors are disabled, print
underlines. Otherwise, they are just too much clutter, because the colors
already delineate the headings just fine.
Use argparse in coverage_doctest

This requires Python 2.7 or higher (or 2.6 if you install it yourself), but
that's OK because this is just a development tool.

Also warn if the Sphinx docs aren't built.
Skip mpmath in coverage_doctest
Add sys.exit to coverage_doctest based on whether full coverage was achieved
3691: Symbolic determinant implementation
3691: Symbolic determinant implementation
Some modifications
Some more modifications
Merge pull request #1886 from mrocklin/strategies-parametrize

tree traversals take functional inputs
Fixed bug in _integer_basis; added test.
Merge pull request #1876 from asmeurer/sphinx_coverage

Add Sphinx coverage testing to the coverage_doctest.py tool
Expanded the docstring of _integer_basis.

``_integer_basis`` determines the scaling factor to put an algebraic
equation in simpler form; a bug in it has been fixed in this PR.

For example in the following example there is no scaling factor

```
>>> from sympy.polys import Poly
>>> from sympy.abc import x
>>> Poly(x**5 - 40*x + 64, x, domain='ZZ').all_roots()[0]
RootOf(x**5 - 40*x + 64, 0)
```

while in master one gets scaling factor 2, and wrong roots.