Less automatical evaluation for Equality, improve simplification

fixes #6116

see also #7960
Have you run my tests on this?  IIRC, there are cases where dif is not a number but nonetheless you can reduce to bool here.  This is why I make a new `r = self.func(dif, S.Zero)` here and check if that is bool, before doing the `dif.equals(0)` stuff.