Generator collapse end state

We used to always output

```js
case 4:
  $ctx.state = END_STATE;
case END_STATE:
  ...
```

Now we skip the state before the END_STATE.