Replacing SendSocketStream calls

This is needed in order to adapt them to the new API which does not
include the socket anymore.
Fixing wrong API calls

Changing the parameters for the API calls. Still need to deal
with the shutdown of the TLS session. This means looking
where do we call SSL_shutdown and finishing the job.
More API fixes
More calls to the old API
Hoefully final references to the old api
More calls to the old API

Notice that there are a lot of places where it is assumed that there is
a socket underneath.
StartTLS uses SendTransaction
Call using the old signature
Same as previous commit
More calls to the old API
Even more calls to the old API
Will they ever end?
Calling new API with wrong parameters