Fix getspnam() failure in NIS/NSS setup.

getspnam() will return remote user information if NIS or NSS is
configured as the primary user DB, but we want it to return local user
information. Fix by opening /etc/shadow manually and using
fgetspent().

This work follows from 3e8b6898fd and 39e7699840.
Redmine #6051: Add shadow password support for AIX.
Redmine #6051: Fix incorrect return code handling calling fgetgrent().

POSIX is ambiguous on the subject, so the return codes are simply a
result of experimentation.
Redmine #6051: Fix pwdadm being called only when changing password hash.

We need to call it when the plaintext password is changed as well.
Redmine #6051: Fix AIX errors about invalid password hash.

AIX doesn't allow a completely empty password hash (although when you
create the user it is initially empty), so use an 'x' instead.
Redmine #6051: Fix administration tool detection for setuid binaries.
Redmine #6051: Add password hash capabilities to tests on AIX.
Redmine #6051: Fix shell and home directory entries in tests on AIX.

AIX only approves of home directories whose parent directory exists,
and only approves of certain shells.
Redmine #6051: Tolerate AIX forcing user's secondary group to be primary.
Redmine #6051: Use correct group removal tool in AIX tests.
Redmine #6051: Add testing of password administration flags on AIX.
Redmine #6285: Skip known bug on AIX.
Redmine #6051: Test a password hash that is usable on all Unices.

The ones that start with dollar are new formats, not supported by AIX.
Redmine #6051: Work around AIX not allowing long usernames.
Demote MAX_FD Log message from ERR to WARNING, since the array is grown if needed.
Changed message wording to be symmetric with 'accepting connection'.
Renamed file to follow convention.
Constified username, fixed some warnings.
Fix Warning about %o expecting unsigned int.
map_test is overly slow on old platforms, speedup by avoid calling memcpy a million times.