### Description

In cases where the same agg is used, instead of computing it multiple times, make another reference to it:
```
stats a = min(x), b = min(x) by z
```

should become
```
stats a = min(x) by z
eval b = a
keep a,b,z
```

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/LogicalPlanOptimizer.java
SubstituteSurrogates() {
            super(TransformDirection.UP);
        }
        @Override
        protected LogicalPlan rule(Aggregate aggregate) {
            var aggs = aggregate.aggregates();
            List<NamedExpression> newAggs = new ArrayList<>(aggs.size());
            
            Map<AggregateFunction, Attribute> aggFuncToAttr = new HashMap<>();
            
            List<Alias> transientEval = new ArrayList<>();
            boolean changed = false;
            
            for (NamedExpression agg : aggs) {
                if (agg instanceof Alias a && a.child() instanceof AggregateFunction af && af instanceof SurrogateExpression == false) {
                    aggFuncToAttr.put(af, a.toAttribute());