audio: quote devices in --audio-device=help

The output is a bit confusing. Quoting the device name probably helps a
little bit; also add minimal explanations to the manpage.
ipc: decouple from MPContext

Just a minor refactor to keep unneeded dependencies on the core low.
ipc: fix minor error cleanup issues

The ipc_thread can exit any time, and will free the mp_ipc_ctx when
doing this, leaving a dangling pointer. This was somewhat handled in the
original commit by setting mpctx->ipc_ctx to NULL when the thread
exited, but that was still a race condition.

Handle it by freeing most things after joining the ipc_thread. This
means some resources will not be freed until player exit, but that
should be ok (it's an exceptional error situation).

Also, actually close the pipe FDs in mp_init_ipc() on another error
path.
ipc: accept both JSON and "old" commands

Minimizes the differences between --input-file and --input-unix-socket.
ipc: skip empty and commented lines
manpage: ipc: mention the socat tool

This is not realy obvious, so I assume this is a helpful hint.

Although the usefulness of such an approach is probably influenced by
the fact that the player might send events that arrive in the short
window while the socket is connected.
player: shutdown all clients before actual uninit

This seems safer. It might be possible that commands sent by the clients
could recreate e.g. audio or video outputs.
manpage: ipc: mention unavailability on Windows

Windows doesn't have unix domain sockets, and can't handle sockets and
pipes in an uniform way. Only the libwaio fallback code is available,
which doesn't do JSON.