Fix and activate optimizer for Solidity, add some new rules.

I didn't write that. In general, switch statements should be written in a way such that the compiler issues a warning if not all cases are covered.