client API: improve comments
lua: add a minor helper function
encode: add a missing \n to a log call
encode: write 2-pass stats only per-packet

The stats were retrieved and written on every encode call, instead of
every encode call that actually returned a packet. ffmpeg.c also does it
this way, so it must be "more correct". Fixes 2-pass encoding.
client API: remove outdated comments
lua: add helper function for printing a table

Although this is something really basic, Lua's standard library doesn't
provide anything like this. Probably because there are too many ways to
do it right or wrong.

This code tries to be really careful when dealing with mixed
arrays/maps, e.g. when a table has integer keys starting from 1, making
it look like an array, but then also has other keys.
manpage: document how the client API retrieves the complicated properties

"Complicated" as in they use sub-properties, and using MPV_FORMAT_NODE
allows an application to retrieve all information at once.
client API: include the reason in MPV_EVENT_END_FILE

Otherwise, the client API user could not know why playback was stopped.

Regarding the fact that 0 is used both for normal EOF and EOF on error:
this is because mplayer traditionally did not distinguish these, and in
general it's hard to tell the real reason. (There are various weird
corner cases which make it hard.)
command: remove extended information from --list-properties

This used to display the property type, but it was not always correct or
even available. The way the property mechanism works, we can know this
only at runtime.
options: sort --list-options

Until now, --list-options printed options in random order. There
literally wasn't any logic in its order, they just appeared as they were
declared. So just sort them.

Note that we can't sort them in advance, because for certain things
internal to m_config, the order actually matters.

Also we're using strcasecmp(), which is bad (locale dependent), but this
is output intended for human consumption, so it's not a problem.
manpage: fix --vf=scale options
terminal: pretty print modules for --msgmodule
options: don't sort sub-option help output

Commit 2c2c1203 sorted the output of --list-options, but the same code
ias also used for listing sub-options, such as --vo=scale:help. For sub-
options, the order actually matters.
video: add VapourSynth filter bridge

Mainly meant to apply simple VapourSynth filters to video at runtime.
This has various restrictions, which are listed in the manpage.

Additionally, this actually copies video frames when converting frame
references from mpv to VapourSynth, and a second time when going from
VapourSynth to mpv. This is inefficient and could probably be easily
improved. But for now, this is simpler, and in fact I'm not sure if
we even can references VapourSynth frames after the core has been
destroyed.
client API: add mpv_get_wakeup_pipe convenience function

Should make integreating with some event loops easier. Untested.
lua: wrap mpv_get_wakeup_pipe()

Pretty much experimental for issue #661.
lua: make it easier to integrate with foreign event loops

We provide some "official" utility functions for this.
manpage: lua: separate "advanced" functions into a separate section

This will be less confusing.
manpage: vf_vapoursynth: document what happens on seeking

Unfortunately, reloading on seeking causes real problems.
vf_vapoursynth: error out early if the file sub-option is not set

Instead of crashing by possibly passing a NULL pointer to VapourSynth.