Fix an error in constant_folding.cc.
Fix an error in constant_folding.cc.

Imagine we have a ShapeN node with N=2 which can be constant folded. The current buggy logic is:
1. 'tensors_to_fetch' will be: {{Shape 0 in constant graph, 0}, ShapeN node in original graph} and {{Shape 1 in constant graph, 0}, ShapeN node in original graph}.
2. 'tensors_to_replace' will be {ShapeN node in original graph, 0} and {ShapeN node in original graph, 0}.
3. when we replace tensors with constant values, we will replace ShapeN:0 twice, with ShapeN:0 value and ShapeN:1 value.

Fix is to add output index to 'tensors_to_fetch'. So now the logic becomes:
1. 'tensors_to_fetch' will be: {{Shape 0 in constant graph, 0}, {ShapeN node in original graph, 0}} and {{Shape 1 in constant graph, 0}, {ShapeN node in original graph, 1}}.
2. 'tensors_to_replace' will be {ShapeN node in original graph, 0} and {ShapeN node in original graph, 1}.
3. tensors will be correctly replaced.

PiperOrigin-RevId: 260069780

aldian/tensorflow,gautam1858/tensorflow,gunan/tensorflow,Intel-tensorflow/tensorflow,davidzchen/tensorflow,DavidNorman/tensorflow,xzturn/tensorflow,freedomtan/tensorflow,aam-at/tensorflow,aam-at/tensorflow,aldian/tensorflow,gunan/tensorflow,davidzchen/tensorflow,tensorflow/tensorflow,ppwwyyxx/tensorflow,adit-chandra/tensorflow,gautam1858/tensorflow,annarev/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,davidzchen/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,jhseu/tensorflow,chemelnucfin/tensorflow,frreiss/tensorflow-fred,aam-at/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,frreiss/tensorflow-fred,annarev/tensorflow,DavidNorman/tensorflow,renyi533/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,aldian/tensorflow,yongtang/tensorflow,tensorflow/tensorflow,davidzchen/tensorflow,Intel-Corporation/tensorflow,ppwwyyxx/tensorflow,xzturn/tensorflow,cxxgtxy/tensorflow,petewarden/tensorflow,adit-chandra/tensorflow,gautam1858/tensorflow,adit-chandra/tensorflow,yongtang/tensorflow,freedomtan/tensorflow,xzturn/tensorflow,renyi533/tensorflow,DavidNorman/tensorflow,arborh/tensorflow,sarvex/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_saved_model,karllessard/tensorflow,sarvex/tensorflow,aam-at/tensorflow,ppwwyyxx/tensorflow,Intel-Corporation/tensorflow,petewarden/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,gautam1858/tensorflow,renyi533/tensorflow,petewarden/tensorflow,xzturn/tensorflow,ppwwyyxx/tensorflow,gunan/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow,frreiss/tensorflow-fred,petewarden/tensorflow,ppwwyyxx/tensorflow,aam-at/tensorflow,freedomtan/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,renyi533/tensorflow,tensorflow/tensorflow-pywrap_saved_model,Intel-Corporation/tensorflow,gautam1858/tensorflow,yongtang/tensorflow,paolodedios/tensorflow,aam-at/tensorflow,paolodedios/tensorflow,cxxgtxy/tensorflow,paolodedios/tensorflow,Intel-tensorflow/tensorflow,gunan/tensorflow,arborh/tensorflow,annarev/tensorflow,arborh/tensorflow,adit-chandra/tensorflow,jhseu/tensorflow,sarvex/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,renyi533/tensorflow,DavidNorman/tensorflow,ppwwyyxx/tensorflow,renyi533/tensorflow,tensorflow/tensorflow-pywrap_saved_model,paolodedios/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,renyi533/tensorflow,petewarden/tensorflow,chemelnucfin/tensorflow,annarev/tensorflow,cxxgtxy/tensorflow,tensorflow/tensorflow,DavidNorman/tensorflow,frreiss/tensorflow-fred,adit-chandra/tensorflow,Intel-tensorflow/tensorflow,karllessard/tensorflow,Intel-Corporation/tensorflow,renyi533/tensorflow,arborh/tensorflow,gautam1858/tensorflow,frreiss/tensorflow-fred,xzturn/tensorflow,freedomtan/tensorflow,paolodedios/tensorflow,DavidNorman/tensorflow,ppwwyyxx/tensorflow,karllessard/tensorflow,frreiss/tensorflow-fred,annarev/tensorflow,arborh/tensorflow,cxxgtxy/tensorflow,jhseu/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,petewarden/tensorflow,jhseu/tensorflow,gunan/tensorflow,jhseu/tensorflow,tensorflow/tensorflow-pywrap_saved_model,annarev/tensorflow,davidzchen/tensorflow,tensorflow/tensorflow-pywrap_saved_model,xzturn/tensorflow,gautam1858/tensorflow,aam-at/tensorflow,freedomtan/tensorflow,davidzchen/tensorflow,ppwwyyxx/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,frreiss/tensorflow-fred,tensorflow/tensorflow-pywrap_tf_optimizer,Intel-tensorflow/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,annarev/tensorflow,aldian/tensorflow,gautam1858/tensorflow,paolodedios/tensorflow,freedomtan/tensorflow,aam-at/tensorflow,tensorflow/tensorflow-pywrap_saved_model,Intel-Corporation/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,Intel-tensorflow/tensorflow,sarvex/tensorflow,petewarden/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,gunan/tensorflow,xzturn/tensorflow,DavidNorman/tensorflow,aldian/tensorflow,karllessard/tensorflow,jhseu/tensorflow,arborh/tensorflow,DavidNorman/tensorflow,sarvex/tensorflow,freedomtan/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,petewarden/tensorflow,Intel-tensorflow/tensorflow,freedomtan/tensorflow,annarev/tensorflow,yongtang/tensorflow,chemelnucfin/tensorflow,gunan/tensorflow,karllessard/tensorflow,freedomtan/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow,chemelnucfin/tensorflow,aldian/tensorflow,tensorflow/tensorflow,jhseu/tensorflow,aam-at/tensorflow,frreiss/tensorflow-fred,xzturn/tensorflow,cxxgtxy/tensorflow,adit-chandra/tensorflow,arborh/tensorflow,aam-at/tensorflow,annarev/tensorflow,DavidNorman/tensorflow,jhseu/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,DavidNorman/tensorflow,freedomtan/tensorflow,DavidNorman/tensorflow,chemelnucfin/tensorflow,davidzchen/tensorflow,adit-chandra/tensorflow,arborh/tensorflow,gunan/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,sarvex/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,jhseu/tensorflow,yongtang/tensorflow,sarvex/tensorflow,sarvex/tensorflow,petewarden/tensorflow,gautam1858/tensorflow,davidzchen/tensorflow,renyi533/tensorflow,yongtang/tensorflow,chemelnucfin/tensorflow,xzturn/tensorflow,cxxgtxy/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow,paolodedios/tensorflow,karllessard/tensorflow,arborh/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,renyi533/tensorflow,arborh/tensorflow,renyi533/tensorflow,ppwwyyxx/tensorflow,gunan/tensorflow,petewarden/tensorflow,arborh/tensorflow,adit-chandra/tensorflow,renyi533/tensorflow,Intel-tensorflow/tensorflow,ppwwyyxx/tensorflow,petewarden/tensorflow,Intel-tensorflow/tensorflow,gunan/tensorflow,chemelnucfin/tensorflow,aam-at/tensorflow,tensorflow/tensorflow-pywrap_saved_model,annarev/tensorflow,yongtang/tensorflow,cxxgtxy/tensorflow,tensorflow/tensorflow,gunan/tensorflow,frreiss/tensorflow-fred,chemelnucfin/tensorflow,aldian/tensorflow,karllessard/tensorflow,paolodedios/tensorflow,davidzchen/tensorflow,frreiss/tensorflow-fred,cxxgtxy/tensorflow,paolodedios/tensorflow,chemelnucfin/tensorflow,xzturn/tensorflow,tensorflow/tensorflow,arborh/tensorflow,aam-at/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,freedomtan/tensorflow,DavidNorman/tensorflow,gautam1858/tensorflow,davidzchen/tensorflow,tensorflow/tensorflow,gunan/tensorflow,chemelnucfin/tensorflow,xzturn/tensorflow,davidzchen/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-pywrap_saved_model,adit-chandra/tensorflow,Intel-tensorflow/tensorflow,karllessard/tensorflow,davidzchen/tensorflow,adit-chandra/tensorflow,Intel-Corporation/tensorflow,tensorflow/tensorflow,jhseu/tensorflow,adit-chandra/tensorflow,tensorflow/tensorflow-pywrap_saved_model,aldian/tensorflow,Intel-Corporation/tensorflow,ppwwyyxx/tensorflow,frreiss/tensorflow-fred,annarev/tensorflow,petewarden/tensorflow,ppwwyyxx/tensorflow,chemelnucfin/tensorflow,paolodedios/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,Intel-Corporation/tensorflow,chemelnucfin/tensorflow,freedomtan/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_saved_model,yongtang/tensorflow,jhseu/tensorflow,karllessard/tensorflow,yongtang/tensorflow,Intel-tensorflow/tensorflow,jhseu/tensorflow,xzturn/tensorflow,adit-chandra/tensorflow