MB-12644:bp:MB-12238: set SO_KEEPALIVE on xmem and ssl proxy sockets

As another guard against possible issues when NAT forgets about
connections between datacenters.

bp note: While I don't think it'll actually affect MB-12238 at all
given that keepalive doesn't work for non-idle sockets and idle
sockets are not kept long by connections pool, I don't want to cause
additional discussion with folks who monitor backports.

Orig-Reviewed-on: http://review.couchbase.org/41589

Conflicts:
	src/memcached_clients_pool.erl

Change-Id: Ica2f6e03b4929b730ba98a4b8621e321870d025d
Reviewed-on: http://review.couchbase.org/43232
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>