Factor ssh master stopping code into a separate public method.

Will be used in a future fix.
Kill the ssh master connection when stopping machines.
Doh
MachineState: the master control socket is needed in multiple methods
tests.py: Don't include the coverage-tests.py file I'm about to add
tests.py: Only run if called directly
Add coverage tests