Change a bit the way clients are handled, without free() them. ref #1
Add support for KEEPALIVE on TCP socket, need to be tested.
Some cleanup.