imcontext: Fixes to the state machine
It turns out that we we were sometimes emitting preedit-end multiple times, and sometimes not at all. Same for preedit-start. To fix this up, introduce a in_compose_sequence flag, maintain it, and use it in the right places.
After these changes, both
C-S-u 1 2 3 Enter Compose a e
generate the right signals:
preedit-start, preedit-changed,..., preedit-end, commit