matroska: prevent uids from being dereferenced when NULL

The old code prevented it since uids being NULL makes a 0 talloc length.
Now that we're iterating over a specific length, NULL can be
dereferenced.
input: more mp_msg conversion

It appears the last run missed all mp_tmsg().

Since the command parser also prints messages, it needs a new parameter
to pass a log context. We go the easy way and just require the input_ctx
to be passed, and use its mp_log.
input: handle MOUSE_LEAVE specially

Do this so that MOUSE_LEAVE can't be combined with other keys. (E.g.
keep 'w' pressed, then move the mouse outside of the mpv window; it will
print a warning what w-MOUSE_LEAVE is not mapped.)
input: translate mouse position to OSD space early

Until now, mouse positions were just passed to the core as-is, even if
the mouse coordinates didn't map to any useful coordinate space, like
OSD coordinates. Lua scripting (used by the OSC, the only current user
of mouse input) had to translate mouse coordinates manually to OSD space
using mp_get_osd_mouse_pos(). This actually didn't work correctly in
cases mouse coordinates didn't map to OSD (like vo_xv): the mouse
coordinates the OSC got were correct, but input.c was still expecting
"real" mosue coordinates for mouse areas.

Fix this by converting to OSD coordinates before passing the mouse
position to the core.
vaapi: potentially make reading surfaces back to system RAM faster

Don't allocate a VAImage and a mp_image every time. VAImage are cached
in the surfaces themselves, and for mp_image an explicit pool is
created. The retry loop runs only once for each surface now.

This also makes use of vaDeriveImage() if possible.
vaapi: check image format in va_surface_upload()

Just for robustness. Also print a warning in vo_vaapi if this happens.
vaapi: make vaDeriveImage() less verbose

This can just be not supported, so making it look like a real error
doesn't make much sense.
network: add options to control TLS verification
osx: fix build

Or at least I hope it fixes it, since I can't test.

Broken by commit 0d90dd0.
osc: add options to show OSC only when FS/windowed

The boolean-options showWindowed and showFullscreen can now be set in plugin_osc.conf to control the behaviour.

enhancement for #262
Merge remote-tracking branch 'upstream/master'
Updated