Fix memory leak

We were failing to clean up parts of reply lists if the connection was
disconnected.  We would transfer the ownership to the IO code, but in
case of callbacks on to-be-killed sockets we would not clear the
objects.
Merge remote-tracking branch 'origin/2.8.4_msopen' into mgmmemleak