Fix sshj tool copy to server retry

See bug report https://github.com/brooklyncentral/brooklyn/issues/768

Also does some cleanup to delete deprecated code, to make refactoring slightly easier.