CCBC-546: Implement dead socket detection for connection pool

This adds dead socket detection for determining whether a socket handle
is still active, or if it has been closed. The implementation is done in
several layers:

* Add new lcb_io{E,C}_chkclosed_fn definition for E and C style I/O
  plugins.
* Bump up LCB_IOPROCS_VERSION to 3
* Add wrapper function in lcbio/ioutils.{c,h} to check socket status
* Make lcbio_MGR check socket status before it returns a cached socket

Change-Id: I688690cd19e63ffef86c3837c48bd5cc9a68a86b
Reviewed-on: http://review.couchbase.org/43029
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>