Don't emit "commit" while discarding the preedit string, otherwise we can
end up in an infinite loop.

While output results, defer preedit-changed and commit signals until the
end. In the case of preedit it just means we sometimes were emitting the
same signal twice in a row, but in the case of commit it was possible
for the marked string to change while we were still working on it here,
causing a potential double-free.

Fixes:
  https://bugzilla.xamarin.com/show_bug.cgi?id=17692
  https://bugzilla.xamarin.com/show_bug.cgi?id=17631
  https://bugzilla.xamarin.com/show_bug.cgi?id=18241