api3: Implement HTTP functionality

This is still a bit rough around the edges as HTTP really goes through a
whole different code path

Change-Id: I8c783cc2bfcf7b7faf856673f51a79064aa4583d
select: stylistic changes

While trying to fork the select plugin, I realized the original could
do with some better naming conventions and use of proper typedefs for
handler types.

None of the logic was actually changed, just some whitespace and naming
fixes:

- We should use either unqualified or sel_-prefixed functions. There is
  no reason for each function to be prefixed with lcb_io_foo. Not only
  does this make the name longer, it also makes it sound like this
  function is actually exported somewhere rather than being static.

- Use prefixed names rather than the '_t' suffix.

Change-Id: I2b7f6a50a36ddaf7e30ef00425bcfaded175ccef
Use newer fixed-width numeric typedefs in header files

We want to show a unified API system in our header files. We still have
a long way to go with other stuff, but the lcb_Uxx has proliferated most
of the codebase already so it's time to just change everything over.

Change-Id: I3890bc050b3b5a77356fcbc9e56e1c04464ef7e2
cliopts: don't assign progname if NULL

Logic should be inverted

Change-Id: Iec46673a75801adff5a565dd361255611f427e3a
Expose retry interval and backoff settings

- LCB_CNTL_RETRY_INTERVAL (how often to retry)
- LCB_CNTL_RETRY_BACKOFF (factor by which interval increases for each
  additional retry)

Change-Id: I12a8a791f2897d17acf85ebec5da91c4f38730c7
Default retry interval should be 10ms, not 100ms

Change-Id: Idcd865054c7743d5e9a844706958ffc1846e73d0
CCBC-471: HTTP - only increment pendops once

Change-Id: I95931cbd4b1aec1fb8b0686699606058cb871203
CCBC-226: Use keepalive for views

This changeset creates a socket pool (lcbio_MGR) instance for HTTP
connections. In order to avoid situations where a pooled connection is
no longer functional, its use scope is limited to view requests and the
socket is only placed back into the pool if the underlying parser object
(via http_parser) indicates that the connection is keepalive-enabled.

Change-Id: I063ffcc67feee990d489816dbbd184e9affe7ad3
CCBC-472: update ht_nodes when receiving new config

This lets lcb_get_server_list work properly to receive new nodes

Change-Id: I5b4a06c5a83f0f5db5f21e89ec4bd6195cc9d6a4
CCBC-456: Replace 'abort' with more 'robust' equivalent

Stuff might still crash, but hey, we tried.

Change-Id: I9c4f4a01cc81a1964a311d9924ea83af2b11cf63
mcserver: timeout scheduling logs should be DEBUG

These don't reflect any kind of state change or error notification

Change-Id: I534237c2c52236ef02df090fcd348fe38e41d944
autoconf: Include generate manpages in distribution

Change-Id: Id804c0fc23ac4b70172a03461087f5b008ae62df
cmake fixups (gtest_zip_path)

Change-Id: Ida7aa19665e72ec8539d2a02b9a5366901194bd4
Add multi threaded functionality

This commit adds multi-threaded functionality within libcouchbase. It
works by running a specialized event loop in a dedicated thread, and
using locks to wait and submit operations to the library.

This commit also aims for _API_ compatibility with existing code, so
that newer APIs do not need to be used in order to cooperate with
multiple threads. These wrappers of course are a bit CPU intensive but
work quite well for simple code, or for the sake of porting an existing
lcb-wait based application over to the threaded code.

The wrapping is done partly via dedicated functions, and partly via a
Perl script which generates the proper stubs that can masquerade
themselves as normal API functions to the preprocessor.

WIP because of tests. Many more tests. And API sanity

Currently provided:

- I/O plugin for MT
- mt.h header file
- cbc-mtstress to test and stress the multi-threaded functionality

Change-Id: I783b74bf04f3b818d59610a18bea4435994012c6