RFC: initial statically compile out if(true) and if(false)

relates to issue #571
Revert "RFC: initial statically compile out if(true) and if(false)"

This reverts commit 31165471da639c794674c2e5de9dc94759c238f5.
Moved optimization from Textgen to a real reduction rule