Only chown on atomic move if the uid/gid don't match the src/tmp file

This is a corner case for remote file systems that don't support
chown() and where the source and destination for the atomic_move
are on that remote file system.

Fixes #7372