audio: alternative fix for previous commit

This is a somewhat obscure situation, and happens only if audio starts
again after it has ended (in particular can happens with files where
audio starts later). It doesn't matter much whether audio starts
immediately or some milliseconds later, so simplify it.
command: sub_add with "auto" should not always select a subtitle track

Running "sub_add file.srt auto" during hook execution automatically
selected the first added track. This happened because all tracks added
with sub_add are marked as "external", and external subtitles are always
selected by default.

Fix this by negating the "external" flag when autoselecting subtitles
during loading. The no_default flag exists for this purpose; it was
probably added for libquvi originally, where we had the same issue.
gl_video: minor simplification

Not needed anymore.
vo_direct3d: check whether D3DFMT_A8 is available

I suspect this is what is happening in github issue #1265 (at least
partially).

If D3DFMT_A8 is not available, fall back to RGBA. This is less efficient
in general, so we normally want to avoid it.
ao_wasapi: don't treat SetDisplayName() failure as fatal

Same for SetIconPath().
demux_mkv: fix a possible out of bounds access

The if branch has a weak check to test whether the codec_id is the short
ID, and handles the long IDs in the else branch. The long IDs are all
longer than 12 bytes long, so hardcoding the string offset to get the
trailing part of the name makes sense. But the if condition checks for
another thing, which could get the else branch run even if the codec_id
is short.

Fix the bogus control flow and check if the codec_id is long enough. One
of these checks could be considered redundant, but include them both for
defensive coding.
demux_mkv: cosmetics
demux_mkv: simplify extradata handling

It was more complicated than necessary.

The behavior changes slightly. Now it might pass through extradata when
it didn't before (hopefully harmless), and doesn't fail with an error if
extradata is not available, even though it's needed (harmless, will fail
either way).
subprocess-win: remove a Vista-only flag

PIPE_REJECT_REMOTE_CLIENTS isn't supported on XP. It's not really
needed, so remove it. Also fix error checking for CreateNamedPipe.
build: fix typos

thanks to @Nikoli
build: move --dvbin to TV features,  remove --dvb
build: move --cplayer to build options

This way it’s near to it’s libmpv counterparts
ao/wasapi: make get_device_delay return an error code
ao/wasapi: simplify the init retry
ao/wasapi: more debugging messages
ao/wasapi: fix unmatched CoUninitialize() on init failure
ao/wasapi: just return 0 unconditionally from the thread

We weren't actually checking this value anyway. We only really
cared about init failure, which was checked another way.
ao/wasapi: avoid redundant passing of ao and wasapi_state as arguments

also drop some useless const declaraitons
ao/wasapi: safely define PKEY constants

Before these definitions were incorrectly guarded by and #ifdef
but since they aren't macros, this would never be true so that
if they were ever added to mingw headers we would have problems.

rename KSDATAFORMAT constants with the same mp prefix for consistency.
also use DEFINE_GUID rather than defining the bare structure
ao/wasapi: remove unused variable