ensure a node sleeps a lease period on startup if another node was previously the master
(this backports some changes from the 1.7 branch)