It reports LCB_DLOPEN_FAILED if built without IO plugins

Change-Id: I8f17b2bf748fc29c3413194ec4968f6be4131f3a
Reviewed-on: http://review.couchbase.org/26114
Reviewed-by: Mordechai Nunberg <mnunberg@haskalah.org>
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Allow to choose plugin constructor without using dlopen(3)

Change-Id: Ic024904a161faf2708e11286c5759eec3aee00fe
Reviewed-on: http://review.couchbase.org/26115
Reviewed-by: Mordechai Nunberg <mnunberg@haskalah.org>
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Add ringbuffer_take_buffer

This is a convenience function to initialize a ringbuffer from an
already-allocated buffer.

Change-Id: I463388ee9867753a6e8b05ffbcebc6d00be5daa4
Reviewed-on: http://review.couchbase.org/26479
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Plug various leaks in tests

Change-Id: Ib10f6e747b3638c6cd96764ab86a94af1ac490a2
Reviewed-on: http://review.couchbase.org/26547
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Allow using of external plugins with environment variables

Change-Id: I4960fc1b7f263d875ff7b56fb26293d8da375a80
Only allocate iops after instance

If an error occurs between iops initialization and input validation,
the iops structure may leak

Change-Id: I67357c8320ccea4df8bcb3c73414ecca02d987ba
CCBC-213: Unify connection routines

The basic idea is to unify the structures for the connections used for
all our objects which depend on their own TCP connections. This is a
work in progress, though it does pass all unit tests without issue
(though integration tests are needed). Constructive comments
appreciated.

The history here was largely borrowed from another rewrite

Change-Id: Iffa9e7b0d8787ae42731f2716d9dc4e9f8f8a314
Abstract io notification requests

This basically wraps the update_event functions

Change-Id: I35f0b00ebf75e182cf4545a36f7b602ebf1b0cd2
Unify read/write functions and refactor them from parsers

- Now our parsing code is sectioned out from our I/O functions. Parsers
  work with a ringbuffer (or similar) structure, and the I/O functions
  are unified in the 'io/readwrite.c' file.

Change-Id: I3e0c87372dc308b99f6aa2de3c96284cbf6b42f1
Make buffer structured owned by connection object

- These objects will be allocated pointers. This is needed for further
  changes, but also cleans things up a bit in terms of uniformity

Change-Id: I89c7a88669d8ab414adbbfe7c0acb7907a17b7d5
Implement simple want-read/want-write semantics

This changes the internal way the library communicates with its event
model. Rather than scheduling read/write requests on demand from random
places in code, code sets 'want' flags (which are the same as the
LCB_READ/LCB_WRITE_EVENT flags). The events are actually scheduled when
the top level 'stack' function (i.e. the event handler) itself leaves.

Not only is this more efficient (i.e. not calling update_event() all the
time, but calling something far more lightweight), but it also
centralizes event scheduling in a single location.

Change-Id: I31ad9183d026f55ae139f4845d040b27759e7c22
IOPS v1 plugin. Support for completion-oriented I/O (WIP)

Change-Id: I6f7a44058af2a179b45f26613400bb2a19f0a92d