don't deadlock on fullscreen

TODO: still breaks when going out of fullscreen
cocoa_common: implement a threadsafe input FIFO
cocoa_common: use threadsafe private api to post key events