man: grammar tweak of mp.add_timeout()
vf-metadata: fix handling of NULL metadata

lavfi would segfault due to a NULL dereference if it was asked for its
metadata and none had been allocated (oops). This happens for libav
which has no concept of filter metadata.
vf_lavfi: reset metadata in reset()

It might have been nice not to do this so that metadata could
accumulate accross seeks, but it seems libavfilter looses its copy
anyway on recreate_graph.
TOOLS: improve autocrop.lua

It now inserts no filters and does nothing until the hot-key is pressed.
This makes it more suitable to be put in ~/.mpv/lua.

When the hot-key is pressed, it now inserts the cropdetect filter and
waits 1 second (or a --lua-opts specified duration) before gathering
the cropdetect metadata and inserting the appropriate crop filter. A
second press of the hotkey removes the crop.
TOOLS: better documentation of lua scripts
cocoa: refactor before significant commits

Moves some functions around, and some cosmetic changes
cocoa: fix a double free
cocoa: new cocoa_main() strategy

Changes to how mpv_main gets wrapped by cocoa_main, on both
the mpv side and the cocoa side. This results in a more
correct cocoa application lifecycle in the "launched from a
.app bundle" base, and allows the cocoa setup to react to
command line args after they get processed by mpv.
cocoa: when launched from a bundle, --keep-open

This makes mpv behave a little more like a normal cocoa app
when launched like a normal cocoa app
cocoa: add --app-style option

This option allows changing the NSApplicationActivationPolicy used
by the cocoa application, which affects things like whether or not
a dock icon is displayed. Solves issue #635

In theory, this option can be somewhat cross-platform, e.g. on
Windows controlling whether or not a process bar button appears.
(But, as no platform besides OSX currently reacts to it, the
option is guarded by HAVE_COCOA for now.)
cocoa: change behavior of --app-style=auto

This changes some default behavior of mpv.
auto now selects --app-style=normal when launched as a bundle,
and --app-style=accessory when launched from the command line.
This affects whether or not a dock icon is displayed, and some
OSX fullscreen behavior with respect to other applications.