Close #172. fix #136. Add a global lock when writing

The lock in coordinator.handleClusterWrite ensures that requests get
sent to replicas in sequence.