Implement VSYNC and VFR into the video output
- VSYNC: periodic signal indicating when the last buffer was displayed on screen, or equivalently when the next frame will be displayed on screen
- VFF: variable frame rate, same as VSYNC, but with a period of time for when it must be displayed instead of single signal.
I've started the work and it's currently working well for iOS and soon for Wayland. It's fixing issues when the framerate is higher than the refresh rate, or at equivalent frame rate when the origin first frame is far from the first VSYNC, leading to high render delay and double wait with swap interval (because we will wait for the next vsync before starting rendering and then again wait for the VSYNC before seeing the result on screen).
I'm mostly waiting for @rom1v's work before sending a MR, and especially waiting for #26183 and !324 .
Ref #17700