cocoa: perform init and uninit synchronously

This is slightly safer and without the resize redraw, should not cause any
deadlock.