C++: fix some wrongness in switch_e with a new regression test (value_then_switch).
TO DO: Get all the tests from C++ into Java, C# and Haskell.