Fix handling of extended frame resize synchronization
* src/xterm.c (x_sync_wait_for_frame_drawn_event): Don't wait if
the frame is invisible. If it is mapped again the compositing
manager is obliged to send us another event, so we can wait in
that case.
(x_sync_update_begin, x_sync_update_finish): Handle extended
resize synchronization here.
(XTframe_up_to_date, handle_one_xevent): Save stuff here.
* src/xterm.h (struct x_output): New field
`resize_counter_value'.