backport OSX SetupMacCommandLine updater fixes
While testing the updater with an ad hoc (non-gitian) build, Kathy and I ran into https://bugzilla.mozilla.org/show_bug.cgi?id=1335916. With gitian-based builds (which are compiled and linked with an older OSX SDK than our ad hoc ones are), the code does not crash but it does emit a warning: WARNING: nextEventMatchingMask should only be called from the Main Thread! This will throw an exception in the future.
We should backport the Mozilla fix for 1335916, as well as a follow up fix from https://bugzilla.mozilla.org/show_bug.cgi?id=1342887.
I will create a branch that contains the cherry picked patches.