CCBC-190: Create compat mode that cache configuration

Connecting to ns_server to retrieve the cluster topology is slow
and in 99% of the cases the cluster topology is stable anyway.
This patch allows you to create an instance that cache the cluster
topology on a local file and allows you to reuse that configuration.

The configuration cache is still considered as experimental.

Change-Id: Ie027600fd28f0934aa7e6e280d3b32f2ff6294bf
Reviewed-on: http://review.couchbase.org/24875
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
NULL isn't standard thing, so require stdlib.h

Change-Id: Ib92fef78fd2c4164e9394ab7b640501308f064cb
fix build for freebsd

Change-Id: Ic12e70fe1417ec2c3c7fc4d86e30ff83aab640ee