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
cocoa_common: split the code, refactoring and cleanups

Split the code to several files. The GUI elements now each have they own files
and private state. The original code was a mess to respect the retarded mplayer
convention of having everything in a single file.

This commit also seems to fix the long running bug of artifacts showing
randomly when going fullscreen using nVidia GPUs.
cocoa_common: report pixels instead of points during mouse movement

This fixes the position reporting on retina displays. Doesn't make any
difference on normal displays where 1px = 1pt.

Fixes: #260
cocoa_common: fix deadlock

After rebasing my dev branch it turned out that  the code deadlocked on
recursive calls of `vo_control`. Make the locking code a little bit smarter
by making always skip locking/unlocking if we are executing a chunck of
code that is already synchronized with `dispatch_sync`.
cocoa_common: call gl_clear indirectly

glClear needs GL headers and we don't want those in `cocoa_common`. Create
a callback in `gl_cocoa` and register it `cocoa_common`.

Fixes #264
vaapi: fix inverted condition

How embarrassing. This could make --hwdec=vaapi-copy as well as
screenshots with vo_vaapi randomly fail. Regression since
commit b8382aa.
vaapi: fix non-sense condition

Attempting signed comparison on unsigned value.
vaapi: remove non-VLD entrypoints

These probably don't work. libavcodec doesn't seem to support them,
and neither did the original mplayer-vaapi patch.
mplayer: fix looping of very short files

Commit 884c179 attempted to make it possible to skip backwards through
the playlist, even for files which fail to intitialize, or play for a
very short time. This was also used to prevent mpv from looping forever
and doing nothing if --loop=inf is used, and no file in the playlist is
playable.

This broke looping of very short files, because mpv was assuming that
this case happened. But there are legitimate use cases.

Fix this by making the looping case special. Instead of checking whether
playback was "very short", check whether something could be decoded and
displayed/played. If yes, allow looping.
Remove completely outdated AUTHORS file

Considering that we use version control, maintaining an AUTHORS file
doesn't make much sense, and indeed it was barely touched since the time
mplayer2 forked from MPlayer. None of the contributors to mplayer2 or
mpv are listed in this file (even uau's work is not appropriately
reflected, despite having an entry in this file).

I'm removing this file because it's obviously pointless to keep around,
and moreover it's misleading.

In theory removing this file might be questionable: the git log reaches
back into CVS and SVN times, which don't have separate committer and
author fields for each comment. The commit messages could be incomplete
and not mention the original author, while the AUTHORS file somehow
could. I doubt this is a real concern, since you can always reconstruct
the original AUTHORS file from git.

Another concern is that this could be interpreted as disrespectful to
the people mentioned in this file; but it isn't meant to be
disrespectful.

Also point out a slight irregularity in the Copyright file.
vf_scale: factor out libswscale equalizer control

Will be used by vo_x11.