cocoa: decouple events from application somewhat
cocoa: sync inputContext inside EventsResponder
cocoa: move set_input_context to macosx_events
cocoa: move handleFilesArray: to macosx_events
build: cocoa-application config target

I had to put it after video options because it depends on cocoa;
is there anywhere better to put it rather than making a new group?
cocoa: macosx_application needs cocoa-application
cocoa: fix build by using the correct HAVE_* macro

This builds but both the libmpv example and the cplayer block infinitely when
building libmpv. That's because we wait inifinitely in `dispatch_sync` as
there's no event loop in the main thread that allows for libdispatch to work..

Whiel we are at it, we should probably investigate how to use mp_dispatch
instead since it is a little lower level and could give us higher control in
building and event loop.
build: expose waf variants to the user

This allows the user to execute multiple configuration and build steps. It
can be used for several scenarios where you need different compiler flags.
build: allow to disable building the cplayer