vd_lavc: don't crash if codec could not be opened

Fixes #1307.
vo_opengl: remove redundant GL state initialization

All of these are already the defaults.

One exception is glDepthMask(), which is enabled by default. But if the
framebuffer has no depth buffer anyway, it shouldn't make a difference.
audio: allow more than 20 channel map entries

This could trigger an assertion when using ao_alsa or ao_coreaudio. The
code was simply assuming the number of channel maps was bounded
statically (which was true at first in both AOs).

Fix by using dynamic memory allocation. It needs to be explicitly
enabled by the AOs by setting a temp context, because otherwise the
memory couldn't be freed. (Or at least this seems to be the most elegant
solution.)

Fixes #1306.
options: simplify channel map validation

The min=-1 case was never used, and the channel map must always be valid
(or in some cases, invalid but empty).
options: fix swapped deprecated/replacement in warning

This was relevant for --af and --vo (both use this option type, and have
deprecated aliases).
options: fix channel map options sometimes failing

Channel amp otpions were not copied correctly: it copied the size of a
pointer to struct chmap, not the struct itself. Since mp_chmap is
currently 9 bytes, this meant the last channel entry was not copied
correctly on 64 bit systems, leading to very strange failures. It could
be triggered especially when using the client API, because the client
API always copies options on access (mpv command line options tend to
work directly on options).
ao_coreaudio: initialize fetched properties to zeros

Should hopefully fix #1249 and #1279
cocoa: allow to black out other display when going fs

fixes #1302
audio: fix one of the previous commits

Fixes commit 52c51149. It broke multichannel (or possibly everything)
for ao_alsa, ao_oss, ao_sndio.
cocoa: fix opening reference URLs (.file/id=)

Fixes #1202

/cc @mpv-player/stable
cocoa: split mkv/webm for imported UTI in plist
DOCS/client-api-changes: mark release 0.7.0
client API: print version on initialization

A rather big oversight, because a log produced with the client API will
not contain the mpv version at all otherwise.
player: don't signal an error if --stream-dump is used

The player thinks an error happened because no audio or video was played
after finishing the file, but this obviously makes no sense with stream
dumping. (error_playing follows the client API convention that negative
values are errors.)
vd_lavc: use avcodec_is_open()

This is "better", although nobody seems to know how this API is supposed
to work at all.
lua: fix broken error message

luaL_error() doesn't support %.*s, because it uses Lua's own format
string mechanism that just looks like the C one. Just drop this part.
osc: always force mouse_move binding

So the OSC will still appear when using --no-input-default-bindings. It
also means it may override a user's mouse_move binding, but I guess
users who don't want the OSC should just use the --no-osc option.
vo_opengl: print error number if framebuffer creation fails

Seems like a waste not to print this.

Anyone with enough technical knowledge to have use for the exact error
can map the number back to the GL symbol, so don't bother to convert it
to a symbol.
vo_opengl: minor changes

Always set the viewport on entry. The way the viewport is tracked is a
bit complicated in my opinion, and in fact it doesn't even reduce the
number of GL calls. Setting it on entry is actually redundant if video
covers the screen fully, because the handle_pass() unconditionally sets
it anyway, but avoiding it would complicate the cases gl->Clear() is
actually needed.

Add a fbo argument to gl_video_render_frame(). This allows you to render
into a FBO rather than the default framebuffer. It will be useful for
providing an API to render on an external GL context. (If that will
actually be added.)
client API: allow multiple mpv instances with terminal=yes

This is simply not allowed, and doing it triggered an assertion. It's
still not allowed, because the terminal and related functionality is a
global resource, and there doesn't seem to be a sane way to manage the
signal handlers.

But be a bit nicer, and just the terminal if it's already in use.

Note that terminal _output_ happens anyway. This becomes usable with
this commit. To facilitate logging-only usage further, also explicitly
disable terminal input, so that "terminal=yes" can be used for logging
without much interference with other things. (It'll still overwrite some
signal handlers, though.)