cocoa_common: make windows appear again

Commit 9efe32120 stops recreating the hidden window used for OpenGL's
extensions autodetection. The `cocoa_common` code assumed the hidden flag could
only come when creating a window which is now not true anymore.

Move some code around so that hidden, fullscreen and window position are
respected on subsequent calls of config.
encoding-example-profiles: add a Nokia N900 profile

Nokia N900 is simply H.264 Baseline, level must be forced to 3.0, at
max. display resolution. There is no pan-scan like on iOS.
vo: remove and cleanup globals

Removes almost every global variabel in vo.h and puts them in a special struct
in MPOpts for video output related options.

Also we completly remove the options/globals pts and refresh rate because
they were unused.
wayland: remove unnecessary function pointers

Remove the usage of getdladdr as it only adds to code complexity
Add a --dtshd option

The spdif decoder was hardcoded to assume that the spdif output is
capable of accepting high (>1.5Mbps) bitrates. While this is true
for modern HDMI spdif interfaces, the original coax/toslink system
cannot deal with this and will fail to work.

This patch adds an option --dtshd which can be enabled if you use
a DTS-capable receiver behind a HDMI link.
manpage: fix --no-dts typo
Remove vo_fps global variable

This is needed by the encode stuff for some reason, so we have to
explicitly pass it. Functionality shouldn't change.
cocoa_common: fix compilation

7686cd7f broke some stuff
cocoa_common: fix crash
Fix missing ctype.h includes

libavutil/common.h stopped including ctype.h, and some source files were
relying on recursive inclusion of this header.
vo: Separate vo options from MPOpts

Separate the video output options from the big MPOpts structure and also only
pass the new mp_vo_opts structure to the vo backend.

Move video_driver_list into mp_vo_opts
w32_common: fix compilation

Broken by commit 1198c03.
options: remove --no-vsync

Latest nvidia drivers ignore the application setting, so this switch
makes even less sense than before. It's still possible to control this
with VO specific suboptions.
options: fix panscan controls

The value range was set to 1-99 instead of 0-1. This broke panscan
control with the 'w' and 'e' keybindings.

Broken by commit 1198c03.
vo_sdl: we don't want to minize the window when losing focus

Because: this makes multi-monitor use entirely useless (as soon as
pointer leaves left screen, mpv gets auto minimized).
core: make more robust against missing libavcodec AVCodecDescriptor entries

Missing entries cause avcodec_descriptor_get() to return NULL, and in
turn mp_codec_from_av_codec_id() will return NULL. This shouldn't
happen, and avcodec_descriptor_get() returning NULL for a valid codec is
clearly a bug.

But make it more robust anyway, and use the decoder's name if this
happens, because I doubt maintainance of the AVCodecDescriptor table
in ffmpeg/Libav will always be perfect and reliable.
core: remove a number of global variables

Move them into per-instance structs. This should get rid of all global
variables in mplayer.c (not counting those referenced by cfg-mplayer.h).

In core/input/ar.c, just remove checking the slave_mode variable. I'm
not sure what this code was supposed to achieve, but slave mode is
broken, slave mode is actually infeasible on OSX (ar.c is completely OSX
specific), and the correct way of doing this would be to disable this
input device per command line switch.