Fix V2 binary to work with multiple targets (#8781)
Fix V2 binary to work with multiple targets (#8781)

`./pants --no-v1 --v2 binary target1 target2` would fail with the exception message:

```
 ValueError: dist/ appeared more than once. All paths must be unique.
```

This is because the results are all trying to materialize directory digests with the path prefix `dist/`, which is not allowed. Instead, we can merge them into one digest and materialize the single digest (this is the same pattern we use for `fmt.py`).
wisechengyi/pants,pantsbuild/pants,pantsbuild/pants,benjyw/pants,benjyw/pants,tdyas/pants,wisechengyi/pants,benjyw/pants,tdyas/pants,pantsbuild/pants,tdyas/pants,wisechengyi/pants,pantsbuild/pants,tdyas/pants,benjyw/pants,jsirois/pants,benjyw/pants,tdyas/pants,benjyw/pants,jsirois/pants,wisechengyi/pants,tdyas/pants,wisechengyi/pants,tdyas/pants,wisechengyi/pants,wisechengyi/pants,wisechengyi/pants,wisechengyi/pants,jsirois/pants,pantsbuild/pants,pantsbuild/pants,tdyas/pants,tdyas/pants,benjyw/pants,pantsbuild/pants