vo_x11, vo_xv: XShmCompletion event support

This fixes OSD flicker with vo_xv at high frame rates.
vo_x11: use two buffers like Xv