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.