Solve of Piecewise functions.

Don't rely on bool(Relational) in the Piecewise solver. Also, check that the solution is valid i.e. Piecewise conditions are satisfied.

Fixes issue 2961: `__nonzero__` method of Rel breaks solve of Piecewise functions
http://code.google.com/p/sympy/issues/detail?id=2961