threads/model: move switch_to_master from class Thread to class ModelChecker