raft: Stop manager on write error
raft: Stop manager on write error

If we failed to save some entries to durable storage, we must stop the
manager. The existing code just logs an error and continues, but this
means the state essentially becomes corrupted and the manager may panic
later. It's better to fail immediately.

The code path that involves Run returning early is not especially
robust, and we've noticed some issues on demotion related to this.
Despite this, the alternative of letting Run continue in this situation
is much worse. We will need to fix the code path where Run returns early
anyway, because it is used in demotion.

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

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