vo: add a new function to be called with vsync timing
cocoa: hack: tmp: report 60 as display FPS
vo_opengl: add draw_image_timed stub
vo: decide frame readiness based on vsync interval

This makes sure that we are generally one vsync interval late for
rendering. We will later report this delta back to the core to delay
the audio as needed.

We delay one frame because this makes calculating stuff like linear
interpolation easier.
vo: reject 0 pts in the vsync_timed case

Avoids a whole lot of redraws during inits/uninits.
vo: sleep as much as possible before the vsync

The arbitrary value of 4ms at which we wake is just something that’s
big enough to account for variations of vsync times.

A much nicer solution would include automatically adjust this value so
that’s as late as possible for mpv to not miss the vsync while still
preserving good responsiveness (by sleeping as much as possible). Or
we could integrate APIs like DisplayLink on OS X so that we get waked
just before vsync (DisplayLink would automatically adjust the wake time
if it detects we arrived late for the last vsync).