CPS Transformer: Use runtime function for the last 3 states

We always generated 3 case/default states at the end of all  machines. These were always the
same. This the generated code to use a single state with a runtime function.

Fixes #881