please test! app remains running in Mac OS X even if no window open

this is done using a global menu that is only active when there is no main window. TODO: fix keyboard shortcut settings page, this depends on the mainwindow being active, will fix later.
move other macosx specific stuff to macosx