Only update the trace file if no AUIP file is found

It is otherwise possible for a mirror to be synced while the upstream
is not yet done syncing and for the site trace to be updated
regardless.
Only perform the second stage if upstream is not updating

Instead of not updating the trace file, skip the second stage so that
the mirror is kept in a consistent state.
Better error reporting
Retry the sync after a delay if an upstream AUIP file is found
Change the code style to match that of the rest of the code
Limit the number of update retries

In case something went wrong somewhere and upstream's update stalled or
there are stale AUIP files, this will prevent ftpsync from retrying
without an eventual error message.
Remove upstream's AUIP file to avoid a deadlock
Merge remote-tracking branch 'rgeissert/really-done'
New version, 20130501