replicator.lua: new() returns events for graceful shutdown
state.lua: check quorum when try to write log
test:replicator.lua: using graceful shutdown of replicator