wayland: use mpv internal key auto-repeat handling

This removes a good chunk of code trying to recreate key repeat.
Because the wayland protocol and xkbcommon don't have an interface for
auto-repeating pressed keys.
wayland: use GetTimerMS for hiding mouse cursor

This commit remove a lot of linux specific code, like epoll. It also reduces
the complexity of the code. Instead of epoll we use poll which makes the
wayland backend more portable to other platforms.
wayland: remove input modifier variable

This variable was never used anywhere.
video: add XYZ support

Needed for the ffmpeg j2k decoder.
Fix compilation with Libav
wayland: use new function xkb_keymap_from_buffer

Bump xkbcommon version and use the new xkb_keymap_from_buffer. This is more
secure, because the from_string expects a 0 terminated string, but this cannot
be guaranteed with mmap.
wayland: remove unused stuff
wayland: avoid iterating over all outputs

If we use the output itself as user data we don't have to iterate over all
outputs when the handle_mode event comes.
wayland: fix wrong poll comment, check for errors

We only print an error message when POLLERR or POLLHUP occurrs, as the
something did go horribly wrong and the server will either deal with it or
crash.

Also add POLLOUT to the events.
vf_rotate: fix for some obscure pixel formats

Repurpose the 3 byte case for any unhandled pixel width. Fixes rotation
with e.g. rgb48. Very inefficient, but works.
stream: remove unused new_ds_stream()
gl_video: use GL_SRGB only if it's really RGB

Use the proper RGB flag instead of !YUV. Currently, this doesn't change
anything, because only RGB and YUV formats are supported.
video: fix setting XYZ flag

Commit 9e0b68a didn't really do this correctly, failure at basic logic.
vo_opengl: XYZ input support

Useful for the j2k decoder.

Matrix taken from http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html
(XYZ to sRGB, whitepoint D65)

Gamma conversion follows what libswscale does (2.6 in, 2.2 out).

If linear RGB is used internally for scaling, the gamma conversion
will be undone by setting the exponent to 1. Unfortunately, the two
gamma values don't compensate each others exactly (2.2 vs. 1/0.45=2.22...),
so output is a little bit incorrect in sRGB or color-managed mode. But
for now try hard to match libswscale output, which may or may not be
correct.
video: support YCgCo colorspace

YCgCo can be manually selected, but will also be used if the decoder
reports YCgCo. To make things more fun, files are sometimes marked
incorrectly, which will display such broken files incorrectly starting
with this commit.
vd_lavc: allow explicitly selecting vdpau hw decoders

This allows using the vdpau decoders with -vd without having to use
the -hwdec switch (basically like in mplayer).

Note that this way of selecting the hardware decoder is still
deprecated. libavcodec went away from adding special decoder entries
for hardware decoding, and instead makes use of the "hwaccel"
architecture, where hardware decoders use the same decoder names as
the software decoders. The old vdpau special decoders will probably
be deprecated and removed in the future.
video: add --hwdec-codecs option to whitelist codecs for hw decoding
manpage: fix option description
csputils: use AVCOL_SPC_YCOCG instead of AVCOL_SPC_YCGCO (fixes Libav build)

This one should probably be blamed on ffmpeg. Its headers contain:

     #define AVCOL_SPC_YCGCO AVCOL_SPC_YCOCG

Uh, ok...
core: don't report byte-based playback position with dvd

DVD playback uses a demuxer that signals to the frontend that timestamp
resets are possible. This made the frontend calculate the OSD playback
position based on the byte position and the total size of the stream.
This actually broke DVD playback position display. Since DVD reports a
a linear playback position, we don't have to rely on the demuxer
reported position, so disable this functionality in case of DVD
playback. This reverts the OSD behavior with DVD to the old behavior.