modify equals and is_constant

** Inline notes describe why the minimal_polynomial is not being used
at present to prove an nsimplify result. solve, however, may be able
to prove that an expression is zero by getting a self-consistent solution
when solving for a surd of the expression. An test was added for this.

** In addition, cancel is used on the expression to try facilitate
simplification to zero (and an expression that motivated the change
has been included).

** don't use equals in sign and abs because it can be very slow

Thanks to Mario Pernici for finding good examples of when the
method used in equals is going to take a long time to solve.
The discussion that I had with him is on the PR page.
define _addsort/_mulsort to identify its usage in codebase
3730: use as_content_primitive and cancel

* also change the general expand to only _mexpand when computing expr2
  in simplify
factor_terms can remove radical from +/- base
simplify handling of -1 and I in Mul.flatten