### 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
@Override
        protected LogicalPlan skipPlan(Filter filter) {
            return LogicalPlanOptimizer.skipPlan(filter);
        }
    }
    static class SkipQueryOnLimitZero extends OptimizerRules.SkipQueryOnLimitZero {
        @Override
        protected LogicalPlan skipPlan(Limit limit) {
            return LogicalPlanOptimizer.skipPlan(limit);
        }
    }
    static class PruneEmptyPlans extends OptimizerRules.OptimizerRule<UnaryPlan> {
        @Override
        protected LogicalPlan rule(UnaryPlan plan) {
            return plan.output().isEmpty() ? skipPlan(plan) : plan;
        }
    }
    static class PropagateEmptyRelation extends OptimizerRules.OptimizerRule<UnaryPlan> {
        @Override
        protected LogicalPlan rule(UnaryPlan plan) {
            LogicalPlan p = plan;
            if (plan.child() instanceof LocalRelation local && local.supplier() == LocalSupplier.EMPTY) {
                
                if (plan instanceof Aggregate agg && agg.groupings().isEmpty()) {
                    p = skipPlan(plan, aggsFromEmpty(agg.aggregates()));
                } else {
                    p = skipPlan(plan);
                }