client: add TLS support

Without this we cannot use authenticated connection over TCP, only UNIX
socket is currently supported.