refactor: don't collect results in `Vec` in `parse_arguments` (#5547)
Don't collect results into an intermediate `Vec` in
`QueryDocumentParser::parse_arguments`, collect them into a
`Result<Vec<_>, _>` directly. This shouldn't have difference in
behaviour since parsing each argument doesn't (hopefully) have any side
effects.