Small protability fix
Use clock_gettime() instead of gettimeofday()

This avoids problems with system clock changes (though there are some
safeguards in place to avoid waiting too long on clock changes).

Thanks to John Sullivan for pointing this out.

We can't easily use CLOCK_MONOTONIC_RAW or CLOCK_MONOTONIC_COARSE even
on platforms that define the clock because we can get runtime errors.
CLOCK_MONOTONIC seems to work on all tested platforms that provide it.
Add a test for clock_gettime() supported clocks

This probes the system for available clocks to see if they can be
reliably used to get a monotonic-like timer (the test doesn't verify the
monotonic part, just usability).
Add a test for tio timeout calculations

This test checks whether the proposed remaining time to sleep is
reasonable.
Fix permissions of test configuration

This sets the permissions on the nslcd-test.conf file while running the
tests to ensure that the permission checks for the bindpwn and
rootpwmodpw options do not fail the test.