lua: add a bunch of functions to get/set properties by their native type

There are some complications because the client API distinguishes
between integers and floats, while Lua has only "numbers" (which are
usually floats). But I think this should work now.
client API: add comment about character encoding issues

Also mention that NULL isn't valid. Although I'm not sure whether the
implementation strictly follows this (it should, but there are some
wacky corner cases).
command: make options property return the list of all options
lua, osc: use properties for chapter/track lists
client API: expose the internal clock

May or may not be useful in some ways.

We require a context parameter for this just to be sure, even if the
internal implementation currently doesn't.

That's one less mpv internal function for the Lua wrapper.
client API: report pause/unpause reason

Not sure about this... might redo.

At least this provides a case of a broadcasted event, which requires
per-event data allocation.

See github issue #576.
command: fix loadfile command

This was broken by commit bb6b543812a724. Note that the original pull
request was fine, but it was broken by my own stupidity when I was
"improving" it.

The problem is that the new loadfile argument was not considered
optional anymore after my changes. The original pull request did handle
this by setting .defval to a dummy value, but I removed that part.

Fix it again by introducing a flag that designates that the parameter is
optional. (I didn't want to add it to m_option.h, because technically,
all options are optional, and it's not possible to have non-optional
options.)
client api examples: set an option with MPV_FORMAT_FLAG
manpage: document the new loadfile argument

I forgot about this.
manpage: Improve wording on icc-approx-gamma

This version is clearer on its origin, prevalence and use case and
offers some advice to the user.
config: don't write default config file

This created an essentially empty config file. This is not really
needed and probably causes more trouble than it solves (such as
littering the home directory with crap), so get rid of it.
config: add a --config-dir option to force config directory

Useful for slave-mode like uses, and not as radical as --no-config.
manpage: remove unused environment variable

We removed gettext (which was disabled by default) a while ago.
config: always print resolved config paths in verbose mode

Restructure the code to make that easier. There should be no functional
changes, other than the log call at the end of each function.
input: allow input.conf bindings to be declared as builtin

This might be helpful if we ever want cascading config files. Also, we
will probably need it if we change the default input.conf bindings, and
want to provide compatibility input.conf files.
config: don't save options to resume-config that didn't change

This is approximate: we read each option value on program start
(before starting playback of a file), and when writing the resume
config, compare each value to the current state. This also means
when a value is changed and then changed back, it's not stored. In
particular, option values set in config files and on the command
line are considered the default.

This should help reducing the numbers of options overridden by the
resume config. If too much is overridden, it becomes an inconvenience,
because changes in config files will apparently have no effect when
resuming a file.

Also see github issue #574.
config: when writing resume config, read options, not properties

This lowers the number of data stored in the resume config a bit
further, because some properties can't be read at program start and when
e.g. the VO wasn't created yet.

Some fields still need to be read from a property (actually only
"volume-restore-data", a hack to save the full volume information). So
abuse the "options/" property, and make use of the fact that changing
things at runtime also changes the options.
client API: change description of format conversions

This changed during the time between writing the comment, and finishing
up the implementation.

Although I'm still unsure about this.
options: allow changing options at runtime

Allow changing all options at runtime, except some cherry-picked
options, which are disabled with M_OPT_FIXED.
osd: override user bindings for OSC input

E.g. binding MOUSE_BTN0 always used the user defined binding. While it
is ok that the user can override mouse_move and mouse_leave (for
whatever reasons), we want to strictly override the bindings when input
is sent to the OSC itself.

Regression since 03624a1.