gfileutils: make g_file_set_contents() always fsync()
Previously, this function only called fsync() if @filename exists and is non-empty. This behaviour was introduced when the function was first written (6cff88ba) and shortly afterwards (d20a188b) respectively, with the latter justified as a performance optimisation.
This meant that g_file_set_contents() does not provide the guarantee that developers assume it has, namely that after a call and a crash, @filename will either contain its previous contents or its new @contents. In practice, when it was previously non-existent or empty on a bog-standard ext4 filesystem, it would often contain NUL bytes matching the @length of @contents, requiring application developers to explicitly handle this third case.
Given the documentation includes the word "atomic", we make this function provide the guarantee that was previously implied but untrue, and document it. If applications require higher performance at the cost of correctness, they can open-code the old behaviour, or we can add a new function to glib providing weaker guarantees.