vo_vaapi: fix reference counting when using software decoding

Recent regression.
build: remove some trailing whitespace
client API: declare as stable

It is reasonably stable, so all further changes will be versioned.

Also change how the libmpv version number is generated. Fix the patch
version number to 0; I don't think we have a use for this. In
particular, the version doesn't version mpv, just the client API.
stream_dvd: fix potential endless loop on seeking

Attempt to fix a reported freeze with some DVDs. Unknown if this helps,
and it still might read the whole DVD before terminating.
stream_dvd, stream_dvdnav: map dvd:// to dvdnav

The old stream_dvd.c implementation is still available under dvdread://.
build: remove BSD-specific /usr/local include path additions

It seems it's generally cleaner to leave this stuff to the BSDs.
Additionally, the NetBSD part wasn't even correct, because it made the
compiler prefer the system include path before local include files.
manpage: remove some trailing whitespace

I wish I could make github run a hook to reject these.
manpage: explicitly document protocols
DOCS: remove en/ sub-directory

This additional sub-directory doesn't serve any purpose anymore. Get rid
of it.
vo_xv: de-ancient some help messages

One message pointed to a removed file, so just get rid of the messages.
They were helpful in the earlier 2000s, but now they're just confusing.
stream: minor cleanups

Remove unused stream type constants. Move some now DVD specific crap
to stream_dvd.c.
stream: add a file cache

For remarks, pretty much see the manpage additions. Could help with
network streams that require too much seeking (maybe), or might be
extended to help with the use case of watching and downloading a file
at the same time.

In general, it might be a useless feature and could be removed again.
win32: add missing priority classes
video: Add BT.2020-NCL colorspace and transfer function

Source: http://www.itu.int/dms_pubrec/itu-r/rec/bt/R-REC-BT.2020-0-201208-I!!PDF-E.pdf
video: Add support for non-BT.709 primaries

This add support for reading primary information from lavc, categorized
into BT.601-525, BT.601-625, BT.709 and BT.2020; and passes it on to the
vo. In vo_opengl, we always generate the 3dlut against the wider BT.2020
and transform our source into this colorspace in the shader.
options: Expose --colormatrix-primaries to the user

Signed-off-by: wm4 <wm4@nowhere>
video: Support BT.2020 constant luminance system

Signed-off-by: wm4 <wm4@nowhere>
video: Generate an accurate CMS matrix instead of hard-coding

This also avoids an extra matrix multiplication when using :srgb, making
that path both more efficient and also eliminating more hard-coded
values.

In addition, the previously hard-coded XYZ to RGB matrix will be
dynamically generated.
video: Better support for XYZ input

With this change, XYZ input is directly converted to the output
colorspace wherever possible, and to the colorspace specified by the
tags and/or --primaries option, otherwise.

This commit also restructures some of the CMS code in gl_video.c to
hopefully make it clearer which decision is being done where and why.
video: Refactor rendering intent for DCP XYZ and :srgb

Notably, we now conform to SMPTE 428-1-2006 when decoding XYZ12 input,
and we can support rendering intents other than colorimetric when
converting between BT.709 and BT.2020, like with :srgb or :icc-profile.