Small improvements to leader state manager and tests
Merge pull request #24 from sindicetech/cdcr-improvment-leaderstate

Small improvements to leader state manager and tests