ARROW-16613: [C++][Parquet] Fix performance of repeated calls to AppendRowGroups()
ARROW-16613: [C++][Parquet] Fix performance of repeated calls to AppendRowGroups()

Repeated calls to `FileMetaData::AppendRowGroups()` would be O(n²) due to incorrect use of `std::vector::reserve`.

Closes #13265 from pitrou/ARROW-16613-parquet-metadata-complexity

Authored-by: Antoine Pitrou <9359a4d812173b65a3a0094cd86363e79731a3c2@python.org>
Signed-off-by: Antoine Pitrou <9359a4d812173b65a3a0094cd86363e79731a3c2@python.org>

kou/arrow,apache/arrow,icexelloss/arrow,wesm/arrow,kou/arrow,icexelloss/arrow,icexelloss/arrow,kou/arrow,wesm/arrow,kou/arrow,icexelloss/arrow,apache/arrow,kou/arrow,kou/arrow,kou/arrow,wesm/arrow,wesm/arrow,apache/arrow,icexelloss/arrow,apache/arrow,wesm/arrow,wesm/arrow,apache/arrow,icexelloss/arrow,wesm/arrow,wesm/arrow,apache/arrow,apache/arrow,wesm/arrow,kou/arrow,kou/arrow,icexelloss/arrow,kou/arrow,apache/arrow,icexelloss/arrow,icexelloss/arrow,kou/arrow,apache/arrow,apache/arrow,icexelloss/arrow,wesm/arrow,wesm/arrow,wesm/arrow,icexelloss/arrow,wesm/arrow,kou/arrow,apache/arrow,icexelloss/arrow,apache/arrow,kou/arrow,apache/arrow,icexelloss/arrow,kou/arrow,apache/arrow,icexelloss/arrow,wesm/arrow