node: fix race in using ready chan
node: fix race in using ready chan

Race was between ready in select in goroutine and setting ready to nil
outside. Also I think it fixes goroutine leak on demote/promote cycles.

Signed-off-by: Alexander Morozov <2043cda4df124b840b98ee1c4307c199042efdf7@gmail.com>

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