Fix latent buildslave's _soft_disconnect method

This derives entirely from https://gist.github.com/seankelly/5034964,
primarily written by Jc2k.