Add error checking method for class Expression

For later use in further refactoring of optimize.
Add optimize methods for UnaExp and BinExp
Add const checking methods for UnaExp and BinExp
[refactor] Use const checking method for UnaExp and BinExp

Using a method for the const checking makes the code a bit easier to
read, as well as moves the const check implementation to a single piece
of code. All occurrences have not been replaced, only the most obvious.
[refactor] Use optimize method for BinExp visitors

Instead of having boiler plate code in visit() methods replace with a
single method. Visitors for the following Expression-subclasses have the
exact same layout.

* AddExp
* MinExp
* MulExp
* DivExp
* ModExp
* AndExp
* OrExp
* XorExp
* PowExp
* and shift_optimize
[refactor] Use optimize method for UnaExp visitors

* UnaExp
* NegExp
* ComExp
* NotExp
* BoolExp
[refactor] Use optimize method for ArrayLengthExp
[refactor] Use optimize method for IdentityExp
[refactor] Use optimize method for AndAndExp
[refactor] Use optimize method for CatExp

Adds error checking for e1 and e2, i.e. check if e1 and e2 are !=
TOKerror which was not done before.
[refactor/fix] Use optimize method for OrOrExp

The change moves the optimize for e2 before error in e1 is checked and
breaks fail compilation test ice10949.d (4 error lines instead of
2). The "new" errors originates from the rhs part of the test expression
which did not get processed before.

Reversing rhs and lhs for the OrOrExp in the test case reverses the fail
output which indicates both rhs and lhs are "broken". The expected test
case output should therefore be updated.