loader/dri3: Check for window destruction in dri3_wait_for_event_locked