tests/clutter/event-delivery: Flush input thread inside wait_stage_updated()
Flushing the input thread might implicitly iterate the mainloop, and thus update the stage while still inside the clutter_test_flush_input() call. This meas the stage update has already happened when we call wait_stage_updated() and we'll wait forever there.
To make sure we catch this stage update inside wait_stage_updated(), call clutter_test_flush_input() from inside wait_stage_updated() and after setting was_updated to FALSE.