Added a hook to perform additional diagnostic activities before killing the channel.

ssh-slaves plugin can leverage this to try to obtain the state of the slave JVM via SSH.

Reference: ZD-23093