Use TCP_KEEPALIVE_* constants instead of raw number.

And with improves on unit tests to consist of.