Expr._eval_interval is more robust against nan

Previously, it would just check if the result after substitution was nan.  But
nan doesn't always absorb into everything, which would lead to nonsensical
results (from integrate()) containing nan.  An example is issue 1227.

Note that we still do have to use subs, because limit() doesn't always do the
same thing as subs when the limit exists.  For example, limit on Piecewise
raises NotImplementedError.
Make Piecewise._eval_interval call Expr._eval_interval if one of the limits is None

In this case, evaluation is just substitution.  This was "working" before only
because comparison between None and numbers is allowed in Python 2.
Create and use NonElementaryIntegral in risch.py

Integrals that risch_integrate() has proven to be nonelementary are instances
of this class.  This is for now just an direct subclass of Integral (i.e., no
new functionality is added).  Later, it might contain some additional
information on the integral, such as why it is not elementary.

Also add option separate_integral to risch_integrate(), in preparation for
integrating risch_integrate() with integrate().
"Integrate" risch_integrate() into integrate()

Previously, I was going to remove the part of the integrate heuristics that
breaks Integral(g1 + g2 + ...) into Integral(g1) + Integral(g2) + ..., but it
turns out this is a bad idea because many of the heuristics rely on this (for
example, trigintegrate() works on monomials).  Because risch_integrate() works
best on additions that have not been broken up, the strategy I employed was to
call risch_integrate() directly before this loop.  I also call
risch_integrate() again inside the loop, in case the integrand was a sum of an
elementary term and a non-elementary term (like erf(x) + exp(x)).
risch_integrate() is called in the loop after all the heuristics, but before
heurisch(), which should now be considered to be only a last resort.

By default, any NonElementaryIntegral returned from risch_integrate() is
recursively integrated using the other methods, in case it can be written in
terms of special functions.  To use only risch_integrate(), call
integrate(risch=True).  risch_integrate() has been removed from the user
namespace, though it can still be imported manually from
sympy.integrals.risch.  Note that integrate(risch=True) is not equivalent to
risch_integrate() in the sense that the former will return an unevaluated
Integral when it fails and the latter will raise NotImplementedError.
Therefore, you should check isinstance(result, NonElementaryIntegral) if you
want to verify that an unevaluated Integral result is indeed nonelementary.

Many tests had to be rewritten slightly, as risch_integrate() returned answers
in different forms than integrate().  Unfortunately, these are occasionally
worse, notably because risch_integrate() has a habit of returning things like
log(a*b) - log(a) instead of just log(b).

The good news is that for the integrals that risch_integrate() can handle,
integrate() is now orders of magnitude faster.

I also rewrote the grossly outdated and inaccurate docstring of
Integral._eval_integral.
Add some TODOs to the Risch code
Mark a slow integral test as @slow
Fix a warning in the Risch code
Add a test_args test for NonElementaryIntegral
Fix a typo
Fix indentation in a doctest
Add additional note in test_ode
Remove set literals (for Python 2.5 & 2.6 compatibility)
Merge branch 'master' into integrate-risch_integrate

Conflicts:
	sympy/integrals/tests/test_integrals.py
	sympy/integrals/tests/test_risch.py
	sympy/solvers/tests/test_ode.py
Merge pull request #1643 from asmeurer/integrate-risch_integrate

Cleanup of integrate()