x11: don't wait until window is destroyed

This can hang if the window was destroyed externally (or that's what I
suspect happens), and we somehow didn't receive the DestroyNotify event.
I'm not sure why we wouldn't receive this event (since it should just be
in the xlib event queue), but on the other hand there's no real need to
wait for window destruction.

This essentially reverts 97fc74e2.
vf_vapoursynth: when seeking, recreate only if it's already created
vf_vapoursynth: factor stuff
vf_vapoursynth: return dummy frames if frames are requested during init

An attempt at fixing #1168.

I see black frames flashing, so it's certainly not perfect.
build: update waf to version 1.8.1

Fixes #1164
build: remove useless function
command: make volume/mute unavailable if audio is not initialized

This does nothing good. This reverts a change made over a year ago - I
don't remember why this was originally done this way.

The main problem is that even if the volume option is set (something
like "--volume=75"), the volume property will always return "100" until
audio is initialized. If audio is uninitialized again, the volume
property will remain frozen at its last value.
command: don't display non-sense if volume is unavailable

Showed "Volume: (unavailable)%". That was dumb.

The message string is now a bit convoluted; mostly because the property
expand syntax can't do "if-else", just "if".

CC: @mpv-player/stable
cocoa: remove usage of Objective-C categories

Objective-C categories need special linker flags from the user when statically
linking (-ObjC LDFLAG), so make everyone's life simpler and remove them.
libmpv/cocoa: allow clients to use mpv event system

This allows mpv's view to take key and send events to mpv's core.
To set key status correctly, clients must call -[NSWindow selectNextKeyView:]
during reconfig on the main thread. All is 'documented' in the cocoabasic
example.

If someone knows a better way to handle giving key to the embedded view,
let me know!
vf_vapoursynth: abstract scripting backend

In theory, vsscript should be doing it, but it's not there yet, neither
did there seem to be any interest in making it flexible enough to handle
more than 1 scripting language.
vf_vapoursynth: add standalone Lua scripting
gl_x11: distinguish missing GLX and too old GLX versions

This probably led to confusing output.

CC: @mpv-player/stable
DOCS/edl-mpv: minor clarification
af_lavcac3enc: fix byte order

Oops.

Fixes #1172.

CC: @mpv-player/stable
coreaudio: use the new device selection API

The CoreAudio API is built around device IDs so we store the integer as string
and read it back.
demux: fix a comment

Don't refer to fields that were removed.
vf_vapoursynth: resolve paths relative to home/config

This affects the script filename passed to the filter. Resolve "~" (and
some other variants) as described in the "Paths" section of mpv.rst.
vf_vapoursynth: don't error if invoke() doesn't return a clip

Not all functions are for creating filters. Consider for example
LoadPlugin.
x11: don't wait for asynchronous X resizing with window-scale

Instead of letting the window-scale property return the old value until
X11 actually executed the resize, just set the new assumed internal
window size immediately. This avoids a "lag" between setting and reading
the window-scale property, like OSD controls typically do.

Remove the additional calls from vo_x11_highlevel_resize() - they're
pointless and slightly wrong, and resize events will take care of
updating these things correctly anyway.

Fixes #1176.

("window-scale" works via VOCTRL_[S|G]ET_UNFS_WINDOW_SIZE.)