is_commutative: replace isinstance with subclass

Muls were not identifying as commutative
special case Mul in is_commutative
Merge pull request #1741 from mrocklin/unify-commutivity-fix

Unify commutivity fix