Unit tests for instance reboot and termination logic in cm/util/master.py. Required reworking time tracking to be more instrumentable.