Chunk server: move replication queuing and flush logic into RunPendingSubmitQueue() method to ensure that no local variables from within AppendBegin() method is used. Properly handle possible append state change in the case of "synchronous" / immediate replication failure.