TCP output SSL support

This fixes and improves a few things in and adds SSL support to the TCP output.
what happens if @ssl_cert or it's passphrase are not set?
It shouldn't blow up if @ssl_verify is false, right?