command: minor simplification
command: change what the metadata property returns

Change the type of the property from a string list (alternating
key/value entries) to a map. Using the client API, this will return
MPV_FORMAT_NODE_MAP, while Lua mp.get_property_native returns a
dictionary-like table.
command: allow changing filters before video chain initialization

Apparently this is more intuitive.

Somewhat tricky, because of the odd state after loading a file but
before initializing the VO.
encode_lavc: copy metadata to output file

Closes #684

Signed-off-by: wm4 <wm4@nowhere>

Includes some minor cosmetic changes additional to the original PR.
ass_mp: don't use --subcp for --ass-styles

The --ass-styles option is implemented by calling ass_read_styles().
This function can take a codepage (so libass will use iconv to convert
it). This was implemented before our --subcp option was changed, and
this code was not updated. Now libass fails opening iconv, because
--subcp is not always (and not by default) a valid iconv codepage.

Just always pass NULL, which means the file passed to --ass-styles must
be in UTF-8. The --ass-styles option is a fringe option anyway (and will
destroy your subtitles), so having codepage support for it isn't
important at all.
vo_opengl, cocoa: allow to autoselect a color profile

This commit adds support for automatic selection of color profiles based on
the display where mpv is initialized, and automatically changes the color
profile when display is changed or the profile itself is changed from
System Preferences.

@UliZappe was responsible with the testing and implementation of a lot of this
commit, including the original implementation of `cocoa_get_icc_profile_path`
(See #594).

Fixes #594
vo_corevideo: remove unused variable
gl_lcms: fix build when lcms2 is not available

Was broken in b0ee9334e.
DOCS/encoding: make "What does not work yet" a proper RST section
lua: add mp.unregister_event() function

Someone requested this... I think.