Fix possible race when stunnel/aptwebserver create their PID files

This patch should fix spurious test failures in jenkins or travis
that are caused by a race condition in the {stunnel,aptwebserver}.pid
file creation
Fix insecure file permissions when using FileFd with OpenMode::Atomic

Commit 7335eebea6dd43581d4650a8818b06383ab89901 introduced a bug
that caused FileFd to create insecure permissions when FileFd::Atomic
is used. This commit fixes the permissions and adds a test.

The bug is most likely caused by the confusing "Perm" parameter
that is passed to Open() - its not the file permissions but intead
the "mode" part of open/creat.
Rename FileFd::Open() Perms to AccessMode

Bug lp:#1304657 was caused by confusion around the name Perms.
The new name AccessMode should make it clear that its not the
literal file permissions but instead the AccessMode passed to
open() (i.e. the umask needs to be applied)
improve umask/fchmod code readability