gdk: Deliver queued events on flush

The current code was marking queued events as flushed,
but left them in the queue. That doesn't make sense to
me - we should deliver all events we have before we
reach the paint phase of the frame cycle.
11 jobs for flush-events in 15 minutes and 35 seconds (queued for 2 seconds)