MB-10409: Helpers to choose b/w IPv4 & IPv6.
MB-10409: Helpers to choose b/w IPv4 & IPv6.

These are helper functions that can be used to:
[1] Pass in the appropriate value (IPv4 vs IPv6) while using the
    networking APIs.
[2] To pick the correct localhost and bind-all address
    representations.

The distinguishing factor is based upon the value of the application
ENV variable "ipv6". If it's set to "true" then IPv6 is enabled,
else IPv4 is used.

Change-Id: I355037a1aa8c237e6e00baf71e52d144a08babe5
Reviewed-on: http://review.couchbase.org/71868
Reviewed-by: Artem Stemkovski <15a0730a27c69f62ab86f2b6c639fca202166c02@couchbase.com>
Well-Formed: Build Bot <80754af91bfb6d1073585b046fe0a474ce868509@couchbase.com>
Tested-by: Ajit Yagaty <670a5cadfa9668cb910cc315f6527868cd5ab42a@couchbase.com>

membase/ns_server,membase/ns_server,membase/ns_server,membase/ns_server,membase/ns_server,membase/ns_server