raft: Use IsLeader method to avoid race detector complaint
raft: Use IsLeader method to avoid race detector complaint

The use of this variable wasn't actually racy, but the race detector
doesn't like multiple goroutines using it directly like this. Using
the IsLeader method turns out to synchronize with the internal raft
state machine goroutine, so it's checking the leader in a non-racy way.
Use this instead.

Signed-off-by: Aaron Lehmann <8ecfc6017a87905413dcd7d63696a2a4c351b604@docker.com>

cezarsa/swarmkit,allencloud/swarmkit,dperny/swarmkit-1,RenaudWasTaken/swarmkit,jlhawn/swarmkit,aaronlehmann/swarmkit,docker/swarmkit,RenaudWasTaken/swarmkit,Noyan759/swarmkit,AliyunContainerService/swarmkit,yp-engineering/swarmkit,AliyunContainerService/swarmkit,deljuven/swarmkit,sungwonh/swarmkit,deljuven/swarmkit,yongtang/swarmkit,cheyang/swarmkit,cezarsa/swarmkit,docker/swarmkit,alyyousuf7/swarmkit,yp-engineering/swarmkit,fate-grand-order/swarmkit,vasil-yordanov/swarmkit,allencloud/swarmkit,jlhawn/swarmkit,cheyang/swarmkit,runshenzhu/swarmkit,runshenzhu/swarmkit,aaronlehmann/swarmkit,sungwonh/swarmkit,elifa/swarmkit,vasil-yordanov/swarmkit,elifa/swarmkit,alyyousuf7/swarmkit,diogomonica/swarmkit,dperny/swarmkit-1,yongtang/swarmkit,Noyan759/swarmkit,fate-grand-order/swarmkit,diogomonica/swarmkit