if StartTLS fails, bail out with an error message

Trap the case of StartTLS failing. To get the actual error code we need the old SID.

This requires the updated version of XML-Stream which was submitted in a pull request for that project.