avdevice/xcbgrab: check return values of xcb query functions