Remove obsolete AC_C_CONST and AC_HEADER_TIME checks.

Both of these check for "problems that are so old that they are no longer
of practical importance on current systems" per the autoconf 2.60 NEWS.
Also move AC_C_INLINE, which _is_ still relevant, to a more sensible
location within the sequence of checks.
Complete the reorganization of configure.ac.

Tests are now done in a logical sequence: programs, compiler/linker
features, header files, declarations and types, type sizes, functions,
and finally libraries.

Also rewrite the check for __func__ to be less repetitive.
Pull out the gc-sections and __func__ checks to .m4 files.
Remove the F_SETFD check from configure.

Consistently use 'if !defined(_WIN32) && defined(FD_CLOEXEC)' instead.