Fsync new db file before renaming

Should rely on the fact this is not required for some filesystems,
the safest bet is to do an fsync before renaming the compacted
file.