vo_gl: cocoa: add support for -ontop

Make the cocoa backend change the windowed window level according to
the value of the ontop property.
core: cocoa: x11: add option -cursor-autohide-delay

Add option -cursor-autohide-delay to control the number of milliseconds
with no user interaction before the mouse cursor is hidden.

Add two negative values with special useful meanings:
* A value of -1 prevents the cursor from hiding (useful for users
with multiple displays).
* A value of -2 prevents the cursor from showing upon activity.

The default is 1 second to keep the behaviour consistent with the
past X11 backend implementation.
cocoa_common: accept window drag event from the whole window surface

Change the window to accept mouse drag events not only on the title
bar, but also on the rest of the window surface; this includes the video
area.

It looks like the changing of the window mask resets the behaviour
specified in the delegate method, probably due to some strange interaction
with NSBorderlessWindow. For this reason call -setPresentationOptions
in the -fullscreen method to remind cocoa the behaviour we want.
cocoa_common: fix double click handling

The Cocoa framework generates only a NS*MouseDown event when
handling the second click of a double click (no NS*MouseUp). If that's
the case put mouse up key in mplayer2's fifo when dealing with the
MouseDown Cocoa event.
macosx_finder_args: use cocoa instead of carbon

macosx_finder_args was using Carbon and wasn't usable any longer on
modern versions of MacOSX. This is very useful to embed mplayer in a mac
application bundle.

When using application bundles, the operating system will call
the main function with only one argument that identifies the process
serial number (this is some additional process identifier in osx other
than the pid). File open events are then dispatched to the application
through events that must be handled accordingly.
vo_quartz: remove this video output

This video output is not useful anymore. It is based on Carbon to draw
the mplayer window and this has been deprecated by Apple in 10.5.

The upcoming 10.8 OSX release should deprecate most of Carbon, so it
doesn't make sense to keep vo_quartz in the codebase when there are
modern and better alternatives (vo_gl and vo_corevideo).
cocoa_common: add license information
configure: enable x11 opengl backend only if cocoa is disabled

The recommended way to get function pointers to the functions in the
OpenGL library is through dlopen/dlsym/dlclose. This causes problems in
the Cocoa OpenGL backend when -lGL (x11's OpenGL headers) is linked
to the binary together with -framework OpenGL.
The linked OpenGL symbols are always from -lGL, causing all the function
pointers to point to null when getFunctions is called against a Cocoa
OpenGL context.

For this reason change the configure autodetection code to disable x11's
gl backend when cocoa is active.
video_out: move gl with cocoa backend before corevideo in video output selection

The gl video output is faster and has more features than corevideo, so it
should be preferred to it on mac osx.

This doesn't affect GUI compatibility because they specify the corevideo
video output along with the suboptions for the shared buffer name to mmap in.
macosx_finder_args: use a custom logfile instead of the global system.log

Change the macosx_finder_args function so that when mplayer2 is invoked
from the Finder in a Mac application bundle, it redirects the output to
~/Library/Logs/mplayer2.log instead of cluttering the global system.log.

This doesn't affect terminal usage which keeps writing to stdout and
stderr.