Implement MasterElection

Unless we failed to refresh it and the ttl expired...