Take total control of buffering and syscall dispatch for pipes

With this patch, CPU usage is greatly reduced to run WAL-E.  Per some
user reports, the CPU usage was high enough to be a bottleneck in
practical use.

The approach for this is documented in pipebuf.py:

    Detailed handling of pipe buffering

    This module attempts to reduce the number of system calls to
    non-blocking pipes.  It does this by careful control over pipe
    buffering.

    Buffering occurs both within the application and in the
    kernel. This module attempts to account for both.

    The general approach is to perform read and write system calls as
    large as the OS pipe buffer.

    To make this optimization work well on Linux, it is necessary to
    change the file descriptor pipe size via fcntl.  It is unknown if
    other systems support setting such large buffers.

    A key data structure here is the "ByteDeque", used to manage a
    series of byte sequences.

    In the case of reads, it splits the bytes received from the
    kernel, placing the un-requested bytes back at the front of the
    deque.  In the case of writes, it defragments memory to issue the
    largest writes that the kernel can accept at once.