keep AppKit calls on the main thread

I've attempted to address #1583 here. Let me know if I've misunderstood. (Or feel free to push additional commits. It's on the main repo.)