Make satisfiable() work with arbitrary expressions, not just Symbols

This is in the same spirit as https://github.com/sympy/sympy/pull/2451.

This also should make satisfiable() more deterministic by sorting the symbols.