[Coding style] improve structure of configure.ac (again)

Subsequent patches require that AC_CHECK_HEADERS and AC_SEARCH_LIBS
are executed before AC_CHECK_FUNC and AC_TRY_LINK
Update documentation
Autoconf - AC_TRY_LINK is obsolete
Autoconf - checks for upcoming CPU affinity implementation
No need to define RANDOM_MAX

Since OS X defines RAND_MAX too, there is no need to define RANDOM_MAX,
which points to either LONG_MAX or RAND_MAX. Additionally, on 64 bit
systems holds LONG_MAX >> RAND_MAX, which leads to wrong results in
rn_uniform_zero_to_one() and rn_uniform_minusone_to_one().
Since OS X 10.7 IPPROTO_SCTP is defined in netinet/in.h
Autoconf - check for features instead of checking for host systems

Since it is likely that new OS versions implement new socket options
it is always a good idea to check for features (here socket options)
instead of checking for host systems. Add an autoconf check for
IP_MTU_DISCOVER, TCP_CORK, and TCP_CONGESTION.
Autoconf - add check for tcp_ca_state
[Coding style] improve structure of configure.ac
Autoconf - fix a warning while checking for clock_get_time
Autoconf - double quote #includes
Autoconf - rename checks for socket options
Autoconf - add check for struct tcp_info
Merge remote-tracking branch 'upstream/next' into next