Expression simplification

Detect some common expressions that yield constants and simplify the
parse tree for them.