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 platform besides OSX currently reacts to it, the option
is guarded by HAVE_COCOA for now.)
cocoa: change behavior of --app-style=auto

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.