Fix potential fastcheck miss
Fix potential fastcheck miss

Some pieces of metadata are updated directly in archive (that is,
without first propagating to/from the other replica) under some
conditions. This is done with mtime (for purposes of fastcheck), both
with and without the "times" preference being enabled, when mtime has
changed but file contents is verified to be the same. In these cases,
when there is nothing to propagate, mtime is still updated in the
archive to make fastcheck... well, fast. Similar mechanism is in place
for directories.

This is correct, because the data set in the archive is the same data
that would have been set when the actual propagation is finished. Plus,
after propagation, the propagated data will always prevail, even if the
user reversed the direction of propagation, for example.

In current code there is a bug which breaks the "there is nothing to
propagate" condition. It does not take into account changes to the
props.

This results in the following failure scenario:

 1. the file mtime has changed and is supposed to be synced;
 2. mtime is updated in the archive during updates scanning;
 3. the sync is not completed for some reason (failure during props
    propagation, or the user actively chose to skip the file);
 4. the archive is never updated with sync results because the sync was
    not completed;
 5. yet, the archive _was_ updated (by now incorrectly) in step 2;
 6. at next scan, the file is (incorrectly) seen as unchanged because
    the archive matches what's on disk.

This bug is currently relatively invisible because mtime syncing is
turned off by default and there must be a propagation failure or a
skipped file to trigger the bug. On top of that, when the file or props
do change the next time then updates scanning will detect it.

This bug has the risk of becoming more visible with an upcoming change
that stores ctime in addition to mtime in the archive. ctime will be
used for a fastcheck mechanism on file metadata (extended properties).
If ctime is then incorrectly updated in the archive as per scenario
above then it could result in missing updates to some metadata (like
extended attributes and ACL).

Fix by adding an explicit check of changed properties.

paulp/unison