Loads the current meta state for each index in the new cluster state and checks if it has to be persisted.
Each index state that should be written to disk will be returned. This is only run for data only nodes.
It will return only the states for indices that actually have a shard allocated on the current node.
previouslyWrittenIndices - A list of indices for which the state was already written before
potentiallyUnwrittenIndices - The list of indices for which state should potentially be written
previousMetaData - The last meta data we know of. meta data for all indices in previouslyWrittenIndices list is persisted now
newMetaData - The new metadata
iterable over all indices states that should be written to disk