Don't rely on bool(Relational) in the Piecewise solver.

Fixes issue 2961:
__nonzero__ method of Rel breaks solve of Piecewise functions
http://code.google.com/p/sympy/issues/detail?id=2961
Solution is valid iff Piecewise conditions are satisfied.
Add a test with a Piecewise result.
Merge pull request #2044 from jrioux/piecewise

Solve of Piecewise functions.