Chunk server: fix write performance regression by removing O_SYNC flag. The primary intention using this flag was to limit the number of dirty pages due to buffered writes in the os unified page cache. Apparently nowadays the O_SYNC flag has noticeable effect even with O_DIRECT flag, at least with xfs. Since the chunk files are protected by checksum the O_SYNC flag does not affect the chunk data integrity violation detection.
Remove the O_SYNC flag, and instead issue fsync() after the final chunk header write. Doing so should help to limit the number of the dirty pages due to os writes with buffered io, and reduce the probability of "missing" writes to to os caching of both the actual file data and the host fs meta data, in the event of power loss or hw/sw malfunction.
Remove obsolete sync code path.