Distribution.Simple.Program.Ar: Implement re-linking avoidance.

We do this by not putting timestamps into the .a file,
and not touching it if is already there and the contents are the same.
Distribution.Simple.Program.Ar: Emulate GNU ar's deterministic mode.

After invoking ar(1), replace each object file's metadata with zero for the
mtime, UID and GID, and 0644 for the file mode. Do not touch the existing
archive if the contents are the same.

This rewrites the previous patch to,
 ∙ use Distribution.Compat.CopyFile.filesEqual;
 ∙ also wipe UID, GID and file mode;
 ∙ do less seeking around;
 ∙ do its work inside a temporary directory;
 ∙ use the standard 'die' instead of invoking 'error'.