tree transformation to get ANF trees

still need to integrate it in several places in TypeCheckerPlugin, see @ANF comments. tested a bit with io domain, but disabled there for now.