vo: add code to redraw as fast as the display allows

This will be useful to implement features like Smooth Motion where the VO
driver needs to be called before every vsync (regardless of the fact that
there is a new image).
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).
vo: move frame timing struct in it’s own header

This is needed so that we can pass down the struct to gl_video in later
commits, without coupling it to vo.h directly. gl_video still recursively
includes vo.h but is mostly decoupled from it.
tmp
TOOLS/stas-conv: add timed value event type
fix printf argument types, dump more stats

%lld is for "long long", but int64_t can be just "long" too on some
systems.
gl_video: queue up a new surface only if it’s new