#14984: On POSIX, enforce permissions when reading default .netrc.

Initial patch by Bruno Piguet.

This is implemented as if a useful .netrc file could exist without passwords,
which is possible in the general case; but in fact our netrc implementation
does not support it.  Fixing that issue will be an enhancement.
Merge #14984: On POSIX, enforce permissions when reading default .netrc.
Merge #14984: On POSIX, enforce permissions when reading default .netrc.
 - followup for issue #18997, make _clear_joined_ptr static.
Merge heads.
#19037: adjust file times *before* moving maildir files into place.

This avoids race conditions when other programs are monitoring
the maildir directory.  Patch by janzert.
#14984: only import pwd on POSIX.
Merge #14984: only import pwd on POSIX.
Merge #14984: only import pwd on POSIX.