To use TLS 1.1 and 1.2, the minimum OpenSSL version is 1.0.1.

Fix issue #1119
UTIL: Add socketpair() function to util.[ch]

Like pipe(2), socketpair(2) allows you to get to FDs which are joined together.
Socketpairs are, however, bidirectional which means a pair of FDs can be used
to communicate back and forth between processes.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
SERVICES: Add a services API for spawning processes

This new services API will be used to spawn processes such as FastCGI or CGI
processes.   It allows for FDs to be passed through to be bound to the child
process and operates over a socketpair(2) for that very reason.

The spawn marshalling code comes from spawner.[ch] and from main.c.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
SERVICES: Replace spawner with calls to services.

The old spawner API has been replaced with the new services API.  This new API
supports passing FDs across to the spawned process which could be used by the
FCGI spawner to pass sockets across in future.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
CGI: Use new services API to spawn CGIs

The use of the new services API to spawn CGI processes means that we can
support running CGIs as their owners even when the web server process has been
de-privileged.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
SERVICES: Restart interrupted services syscalls

Under some platforms (e.g. Linux ARMv4 LE SFP) the thread which
handles signals is not as useful as others.  If the services
thread ended up handling a SIGCHLD which didn't happen all the
time but could happen sometimes, then it would cease processing
service requests.

This fixes this problem.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
MAIN: Do not start services when starting valgrind

Services should not be started if the main process is to be re-run under
valgrind.

This prevents extra FD leakage.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>