tests: close any ssh master connections on teardown