Subscribe to leadership events before starting the raft node
Subscribe to leadership events before starting the raft node

This ensures that we don't miss the event where we become the leader. If
we do miss it, WaitForCluster can hang forever.

Fixes #699

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

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