function readNextDocOp(docState, blockIndex) {
  let block = docState.blocks[blockIndex]
  if (!block.columns[actionIdx].decoder.done) {
    return {docOp: readOperation(block.columns), blockIndex}
  } else if (blockIndex === docState.blocks.length - 1) {
    return {docOp: null, blockIndex}
  } else {
    blockIndex += 1
    block = docState.blocks[blockIndex]
    for (let col of block.columns) col.decoder.reset()
    return {docOp: readOperation(block.columns), blockIndex}
  }
}
Parses the next operation from block `blockIndex` of the document. Returns an object of the form
`{docOp, blockIndex}` where `docOp` is an operation in the form returned by `readOperation()`,
and `blockIndex` is the block number to use on the next call (it moves on to the next block when
we reach the end of the current block). `docOp` is null if there are no more operations.