Send an event about progression to the eventpipe
Make formatting consistent
Let the message type name be consistent with others
dirname(3) can modify content.
Fix symlink during fetch.
Stop using of mkstemp for regular files.
Umask is meaningless for mkstemp.
Fixes.
Fix fetching for reinstalled packages.

Reported by:	az
Align messages
Do not define at HAVE_ATOMICS_BUILTINS if not available
Update to release candidate 4.
Go towards 1.4.
Use rename(2) to install symlink.

After discussion, it comes clear that pkg should not unlink old symlink
as it potentially could lead to an inconsistent state when the old link is
removed but new one is not installed for some reasons. By using
rename(2) the target link is only touched once.

Suggested by:	bdrewery