BF: fix sorting errors with Sympy trunk

Sympy now raises an error when trying to compare symbols.  We were comparing
symbols implicitly by sorting.  Use explicit name sorting instead.  Don't sort
symbols input to Formulae.

@jonathan-taylor - is this right?  We are just sorting the symbols for
the names in fact?  And can you see any problem not sorting the terms
input into the formula?