SCTX-1649: Set SO_KEEPALIVE on server sockets

This ensures that a TCP connection is cleaned up on the server, when the
connection is closed on the client without the server knowing (for example, if
a FIN packet is not sent or went missing).

This does not affect idle connections, or long-running XenAPI calls.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Merge pull request #162 from Zhengchai/HFX-1127

HFX-1127: Pick SCTX-1649: Set SO_KEEPALIVE on server sockets to clearwater-sp1-lcm
SCTX-1766: Configurable timeout for stunnel

Imported from xen-api-libs-transitional.git
9e46fa5d7ae9c4d3f10e58fce968bcee91e5bbbc

Signed-off-by: Akshay <akshay.ramani@citrix.com>
Imported-by: John Else <john.else@citrix.com>

Resolve Merge Conflicts for clearwater-sp1-lcm
	stunnel/stunnel.ml

Signed-off-by: Zheng Chai <zheng.chai@citrix.com>