Avoid WM_QUIT loop by posting it directly to thread message queue if necessary.
This fixes a rare infinite loop in FFXIV Launcher when changing layout (which restarts it). Since it's rare, we first give a chance to a lazy WM_QUIT via PostQuitMessage because that allows other messages to be processed first.
See also: https://bugzilla.mozilla.org/show_bug.cgi?id=480220