[caffe2] fix -Wrange-loop-construct in onnx_exporter.cc (#56759)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/56759
```
caffe2/caffe2/onnx/onnx_exporter.cc:415:21: error: loop variable 'it' creates a copy from type 'const std::pair<const std::basic_string<char>, int>' [-Werror,-Wrange-loop-construct]
for (const auto it : blob_versions) {
^
caffe2/caffe2/onnx/onnx_exporter.cc:415:10: note: use reference type 'const std::pair<const std::basic_string<char>, int> &' to prevent copying
for (const auto it : blob_versions) {
^~~~~~~~~~~~~~~
&
```
Reviewed By: yfeldblum
Differential Revision: D27960126
fbshipit-source-id: fd46f37cf1aca9441209de8eb06add204046db95