Refactored sympy.core.relational.

Broke out logic from the Relational class into subclasses.  Simplified the
logic without modifying it.  Eliminated the helper functions, replacing with
aliases to the relevant classes.  Added docstrings for Relational, Equality,
and Unequality.
automaticly distribute ExprWithLimits across Eq's

- add new test for Sum and Product
Fixes #2627, latex printing of Indexed and IndexedBase.
requested revisions
add quick solution for linear systems of equations

The routines were added to the solvers.py instead of matrices since
it is in the context of solving symbolic matrices that these are
most applicable.
Don't escape underscores in Function names in the LaTeX printer

The common case of underscores is to represent subscripts. If a function wants
a literal underscore, it should define its own printer.

This reverts #996 and fixes #2752.
use generate_bell for det_perm; work with Sparse, too

self -> M

simplify=False is used in the tests. Without this, the
times taken increases significantly. (e.g. 48 seconds
instead of 2 seconds for the system of issue 2015.)

some refactoring of code was also done.
Use iterable(expr) rather than hasattr(expr, '__iter__') in together()

The difference is that the former excludes strings and dictionaries.

Related to #2750.

Unfortunately, I don't have a good test for this. The expression from #2750
breaks in a new way. They are both related to the matrix expressions objects
containing strings in their .args. And even if that worked, they would not
test this fix if that behavior ever changes.
Refactored relational: edits as per @asmeurer's suggestions.
add distance methods to Ray and Line; simplify segment calc

The concept of similar triangles can be used to obtain a
delightfully simple expression for the distance from a
point (x1,y1) to the line y=mx + b. Here is the master
result which relies on factoring at the end:

>>> from sympy import *
>>> var('x1 y1 m b x y')
(x1, y1, m, b, x, y)
>>> p=Point(x1,y1)
>>> l=Line((0,b),slope=m)
>>> factor(l.perpendicular_segment(p).length,deep=True)
sqrt((b + m*x1 - y1)**2/(m**2 + 1))

So with
y2 = m*x1 + b (pt on line vertically above or below x1)
H = y1 - y2
d2 = 1 + m**2

dist = abs(H)/sqrt(d2) = sqrt(H**2/d2)

which is the factored form shown above and is now returned
without the need for simplification in this commit.
solve_univariate_inequality shouldn't assume solve output is sorted

    closes #2785
if x and y are real, x**y is real indeed and real and imaginary parts
do not need any further expansion.
Fix 188fce4: Pow.is_real is True if base>=0 and exp>=0
Fix cse-related failure in test_issue_3022
Move new Pow.is_real tests to the right place
Merge pull request #2786 from skirpichev/gh2785

solve_univariate_inequality shouldn't assume solve output is sorted
solve_univariate_inequality: don't assume that solve returns real solutions

    closes #2794
Docstring fixes in sympy.tensor.tensor

Added new example about symbolic data inside a tensor.
diffgeom docstring fixes
do not use None in factor_list

The None tracked a term that should not be extracted
if the exponent assumptions didn't allow. But this has
to be handled differently since the "k" value is needed
if the assumptions do allow.