QPID-5771: ensure the closed event is passed to the listener even if closing the endpoint input throws something, ensure the connection is unregistered from the connection registry

git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1596894 13f79535-47bb-0310-9956-ffa450edef68
QPID-5781: remove connection from the registry upon exception while closing, ensure we dont loop retrying it

git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1596899 13f79535-47bb-0310-9956-ffa450edef68