Make cancel() on non-Expr exit early.
_eval_interval: Use limit if simple subs resulted in oo.

_eval_interval relies on first a simple substitution, and then
falling back to the more correct limit calculation when we got NaN.
The problem is that it relies on things automatically simplifying
to NaN, but this is not always the case for complex expressions.
As soon as we get an Infinity, this should signal that we need
a more careful evaluation using the limit.
_eval_interval: Use it in the Piecewise code.

Call Super(self, Piecewise)._eval_interval whenever possible to
benefit from the limit fallback.
gruntz: Check that nuse will be an integer.

Avoids the following bug:

>>> limit(exp(x)/(x*exp(x*y) + exp(x*y)), x, oo)
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "~/sympy/sympy/series/limits.py", line 85, in limit
    r = gruntz(e, z, z0, dir)
  File "~/sympy/sympy/series/gruntz.py", line 632, in gruntz
    r = limitinf(e, z)
  File "~/sympy/sympy/core/cache.py", line 93, in wrapper
    r = func(*args, **kw_args)
  File "~/sympy/sympy/series/gruntz.py", line 416, in limitinf
    c0, e0 = mrv_leadterm(e, x)
  File "~/sympy/sympy/core/cache.py", line 93, in wrapper
    r = func(*args, **kw_args)
  File "~/sympy/sympy/series/gruntz.py", line 501, in mrv_leadterm
    series = calculate_series(f, w, logx=logw)
  File "~/sympy/sympy/series/gruntz.py", line 455, in calculate_series
    series = e.nseries(x, n=n, logx=logx)
  File "~/sympy/sympy/core/expr.py", line 2600, in nseries
    return self._eval_nseries(x, n=n, logx=logx
[...]
  File "~/sympy/sympy/functions/elementary/exponential.py",  line 430, in _taylor
    for i in xrange(n):
TypeError: 'Add' object cannot be interpreted as an integer
gruntz: Check the sign of every exp() term.

Fixes the following wrong result:

>>> limit(exp(x)/(x*exp(x*y) + exp(x*y)), x, oo)
∞

The result actually depends on sign(y - 1).
gruntz: Handle hyperbolic sinh, cosh, tanh, coth.

Implement rewrite as tractable for hyperbolic functions so that
the Gruntz algorithm for limit calculation can do its thing.
gruntz: nuse = n + 2*ceiling(cf)

cf doesn't have to be an integer, but it needs to be a number,
and we use the ceiling function to convert to an integer.
Merge pull request #2565 from jrioux/series

Handle limits of hyperbolic functions.
changed cse so it works for Piecewise also
Fixes double-counting bug in constant_renumber

* dsolve((x+1)*f(x).diff(x) - f(x)- 1,f(x)) now returns correctly
* tests in test_constantsimp and test_ode updated
* doctest corrected
* minor readability editing
nested constantsimp to allow for nonlocal state changes
debatable simple fixes

3 failures in test_ode, 2 in test_constantsimp
All are debatable simplifications.
Custom version of ode.constantsimp

- fixes bugs I had
- DOES NOT PASS TESTS!