### 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
transientEval.add(aliased);
                    }
                    
                    else {
                        newAggs.add((NamedExpression) agg.replaceChildren(Collections.singletonList(s)));
                    }
                } else {
                    newAggs.add(agg);
                }
            }
            LogicalPlan plan = aggregate;
            if (changed) {
                var source = aggregate.source();
                plan = new Aggregate(aggregate.source(), aggregate.child(), aggregate.groupings(), newAggs);
                
                if (transientEval.size() > 0) {
                    plan = new Eval(source, plan, transientEval);
                    
                    
                    
                    plan = new EsqlProject(source, plan, Expressions.asAttributes(aggs));
                }
            }
            return plan;
        }
        private static String temporaryName(NamedExpression agg, AggregateFunction af) {
            return "__" + agg.name() + "_" + af.functionName() + "@" + Integer.toHexString(af.hashCode());
        }
    }
    static class ConvertStringToByteRef extends OptimizerRules.OptimizerExpressionRule<Literal> {