Replace the trace file atomically

Given the additional calls that append to the trace file, it could be
possible for an incomplete file to be downloaded, leading to unexpected
results.

Signed-off-by: Raphael Geissert <geissert@debian.org>
Add RSYNC_DELETE_METHOD option to make it easier to use --delete-delay

If RSYNC_OPTIONS2 hasn't been modified, this will result in
--delete-delay being used if rsync 3.0.0 or greater is used.

Signed-off-by: Raphael Geissert <geissert@debian.org>
Method --delete-delay as not configurable default
Move reusable code to function rsync_protocol