launch: appliance: Use socketpair instead of pipe for qemu stdin/stdout.

The libvirt backend already uses a Unix socket for the appliance
console, and so for the libvirt backend the fields g->fd[0] == g->fd[1].

Change the appliance backend to use a socketpair, so we need just a
single file descriptor for qemu stdin/stdout (ie. appliance console).

Consequently we can remove the array int fd[2] in the handle and
replace it with a single file descriptor.
launch: appliance: Set FD_CLOEXEC flag on console socket.

The earlier (pipe-based) code never set this flag, but that was a bug,
potentially allowing the file descriptor to be leaked to subprocesses.

Set the FD_CLOEXEC flag, but also ensure it is cleared in the child
process just before qemu is exec'd (otherwise qemu would not have a
console).
lib: Rename g->fd to console_sock and g->sock to daemon_sock.

This just renames the fields in the handle to more descriptive names.
There is no functional change.
launch: unix: Set g->daemon_sock = -1 after closing it.

This ensures we don't accidentally use the closed fd.
protocol: Remove message_summary code.

Produces lots of output, and not very helpful.
protocol: Abstract out socket operations from protocol code.

This creates an abstract layer below the protocol code which handles
the socket operations.  This will make it easier to introduce libvirt
virSocketPtr operations in future.

In the handle, g->conn contains the connection to the appliance.
g->conn is NULL when we're not connected.

poll(2) is used instead of select(2).

All error messages about launch failing or the appliance unexpectedly
dying are handled by two common error message functions, and these
contain a better explanation of what to do.
protocol: Handle log messages from connection layer centrally.

Previously described as a "gross hack and massive layering violation".
out-of-tree build: don't distribute extconf.rb.in template, use generated exconf.rb

Apparently, the file will only be autogenerated in $(builddir) if it
is not already present in $(srcdir).
out-of-tree build: Fix localized manpages
Still build the libguestfs-specific parts when --disable-appliance is passed to configure
out-of-tree build: Fix link creation