Fixes about replication lag

- Do not terminate master replication session until it receives all slave's ACK
- Handle slave's ACK received out of order.
- Fix TestZookeeperConsistencyPersistence IT test flakiness (ensure replicas sorted)
- Raise update lag event only when lag is modified