Constant fold an Expression.
If variable has a const initializer, return that initializer.
It is possible for constant folding to change an array expression of unknown length, into one where the length is known. If the expression 'arr' is a literal, set lengthVar to be its length.
Same as above, but determines the length from 'type'.
Perform constant folding.