Avoid a bug in Poco SecureSocket stack.

The session must be aborted manually before any destructors from
the other objects are called.

It is hard to pin down but at some point between v1.36 & v1.46 the bug
was fixed by ensuring that destructors don't throw exceptions.
Refs #8924