Reworked source code to work with libcouchbase2

Much of this is still very much a work in progress. Nevertheless the
tests seem to pass. More work and view-specific tests will be needed in
the future, but in any event, the base functionality seems to be here.

There may be other issues when trying to have the automagic installation
of libcouchbase, however it might be prudent now to request users to
install the library itself (now that the installation process is much
more streamlined).