Automatically disconnect when deallocating client

It is possible that the client is still connected to the remote host
when it is deallocated, and in that case the resources held by the
connection will leak.

Automatically disconnect the client when the object is released. Then
the client is guaranteed to become disconnected as long as the memory is
properly handled.

Signed-off-by: Marcus Karlsson <mk@acc.umu.se>