global: force fsync() to worker thread when saving state
The g_file_replace_contents_async() API can potentially call fsync() from the thread calling into it upon completion. This can have disasterous effects when run from the compositor main thread such as complete stalls.
This is a followup to 86a00b68 which assumed (like the rest of us) that the fsync() would be performed on the thread that was doing the I/O operations.
You can verify this with an strace -e fsync and cause terminal to display a command completed notification (eg: from a backdrop window).