vo: remove unused callback
core: support mpv directory itself as a valid location for config files on Windows

This prefers ./ on Windows if-and-only-if the file being searched for
already exists there. (If the mpv directory is non-writable, the result
is still intended behavior.) This change is transparent to most users
because the user has to move the config files there intentionally, and
if anything, not being detected would be the surprising behavior.
m_option, vf: add label support

Can be used to refer to filters by name. Intended to be used when the
filter chain is changed at runtime.

A label can be assigned to a filter by prefixing it with '@name:', where
'name' is an user-chosen identifier. For example, a filter added with
'-vf-add @label1:gradfun=123' can be removed with '-vf-del @label1'.
If a filter with an already existing label is added, the existing filter
is replaced with the new filter (this happens for both -vf-add and
-vf-pre). If a filter is replaced, the new filter takes the position of
the old filter, instead of being appended/prepended to the filter chain
as usual. For -vf-toggle, labels are compared if at least one of the
filters has a label; otherwise they are compared by filter name and
arguments (like before). This means two filters are never considered
equal if one has a label and the other one does not.
m_option: move code around

Move the helper functions for parsing -vf, and rename some.
m_option: allow removing filter entries by content with -vf-del

If a complete filter description is passed to -vf-del, search for an
existing filter with the same label or the same name/arguments, and
delete it. The rules for filter entry equality are the same as with
the -vf-toggle option.

E.g.

-vf-add gradfun=123:gradfun=456
-vf-del gradfun=456

does what you would expect.
command: auto-insert yadif when switching deinterlacing

If VO deinterlacing is unavailable, try to insert vf_yadif.

If vf_lavfi is available, actually use vf_yadif from libavfilter. The
libavfilter version of this filter is faster, more correct, etc., so it
is preferred. Unfortunately vf_yadif obviously doesn't support
VFCTRL_GET/SET_DEINTERLACE, and with the current state of the
libavfilter API, it doesn't look like there is any simple way to
emulate it. Instead, we simply insert the filter with a specific label,
and if deinterlacing is to be disabled, the filter is removed again by
label.

This won't do the right thing if the user inserts any deinterlacing
filter manually (except native vf_yadif, which understands the VFCTRL).
For example, with '-vf lavfi=yadif', pressing 'D' (toggle deinterlacing)
will just insert a second deinterlacer filter. In these cases, the user
is supposed to map a command that toggles his own filter instead of
using 'D' and the deinterlace property.

The same applies if the user wants to pass different parameters to the
deinterlacer filters.
demux_mkv: use a single flag to indicate whether cues have been read

Before this commit, the demuxer would in theory accept multiple cues
elements (and append its contents to the index in the order as
encountered during reading). According to the Matroska specification,
there can be only one cues element in the segment, so this seems like
an overcomplication.

Change it so that redundant elements are ignored, like with all other
unique header elements. This makes implementing deferred reading of the
cues element easier.
demux_mkv: defer reading of seek index until first seek

Playing Youtube videos often requires an additional seek to the end of
the file. This flushes the stream cache. The reason for the seek is
reading the cues (seek index). This poses the question why Google is
muxing its files in such a way, since nothing in Matroska mandates that
cues are located at the end of the file, but we want to handle this
situation better anyway.

The seek index is not needed for normal playback, only for seeking.
This commit changes header parsing such that the index is not read on
initialization in order to avoid the additional stream-level seek.
Instead, read the index on the first demuxer-level seek, when the seek
index is actually needed.

If the cues are at the beginning of the file, they are read immediately
as part of the normal header reading process. This commit changes
behavior only if cues are outside of the header (i.e. not in the area
between EBML header and clusters), and linked by a SeekHead. Other
level 1 elements linked by the SeekHead might still cause seeks to the
end of the file, although that seems to be rare.