tidy think-we-are-master-when-we-are-not discrepancies

fix test which depended on promotion when master-becomes-master-again, and
when considering demotion look at whether we were master *locally* not globally,
on reassertion, rewrite the master file and the change.log;
and throw if we fail going in to hot backup