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
Link directly pkg frontend to libsbuf
Add check for arc4random.
Stir arc4random.
Rework installation logic.

If a file is found on the way do the following:
1) Append 12 chars random suffix to the filename;
2) Extract new file to that modified filename;
3) Rename new file to old file.
- or -
3) Remove temporary file in case of error.
Report about locked packages.

Suggetsed by:	az
Indicate the stage of pkg-devel.