Beta: Factor out common factors in products

Simplify now transforms a term like
    b * a * c + b * c * d
to
    b * c * (a + d)

It's not fully functional yet.
Replaced (==) by elem

well, that's awkward...