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.
Redmine #6171: Improve acceptance test speed on Windows.

Run the entire test suite under one single GAINROOT umbrella, instead
of launching it for each test. This dramatically improves the testing
speed on Windows.
KERN_BOOTTIME is defined inside sys/sysctl.h.
Fix typo, it existed there a long time causing configure test to always fail.
Set GCC-specific flags before most configure checks.

This fixes detection of isfinite() and other C99 functions in Solaris 10
and other platforms.
Remove AM_PROG_CC_C_O, deprecated since automake 1.14.
Merge pull request #1805 from jimis/master

configure.ac reordering