A trait for parsing relations with full context needed for tree building.
This includes extensions, the parsed pair, input children, and output field count.
Deduplicates expressions across all sets and produces the AggregateRelβs
protobuf fields: a flat deduplicated expression list and per-set Grouping
messages with index references into that list.
This is a utility function for extracting a single child from the list of
children, to be used in the RelationParsePair trait. The RelationParsePair
trait passes a Vec of children, because some relations have multiple
children - but most accept exactly one child.