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!