cocoa: OpenGL setView and update must be used on main thread (thanks, Tim!).

If called from background threads, use Grand Central Dispatch to use the
main thread instead. On the main thread, just call them directly.

Fixes Bugzilla #4932.

--HG--
extra : rebase_source : f902bad5141444e127ccb6d526246e88465dde80
2 files changed