### Description

As we have more rules doing analysis across plans, a number of methods are useful to add to the `QueryPlan` class itself, mainly around expressions:

```
- expressions() - return the expressions declared by this plan
- references() - return the references from the expressions above
```
x-pack/plugin/ql/src/test/java/org/elasticsearch/xpack/ql/plan/QueryPlanTests.java
public void testTransformWithExpressionTopLevel() throws Exception {
        Limit limit = new Limit(EMPTY, of(42), relation());
        LogicalPlan transformed = limit.transformExpressionsOnly(Literal.class, l -> of(24));
        assertEquals(Limit.class, transformed.getClass());
        Limit l = (Limit) transformed;
        assertEquals(24, l.limit().fold());
    }
    public void testTransformWithExpressionTree() throws Exception {
        Limit limit = new Limit(EMPTY, of(42), relation());
        OrderBy o = new OrderBy(EMPTY, limit, emptyList());
        LogicalPlan transformed = o.transformExpressionsDown(Literal.class, l -> of(24));
        assertEquals(OrderBy.class, transformed.getClass());
        OrderBy order = (OrderBy) transformed;
        assertEquals(Limit.class, order.child().getClass());
        assertEquals(24, ((Limit) order.child()).limit().fold());
    }
    public void testTransformWithExpressionTopLevelInCollection() throws Exception {
        FieldAttribute one = fieldAttribute("one", INTEGER);
        FieldAttribute two = fieldAttribute("two", INTEGER);
        Project project = new Project(EMPTY, relation(), asList(one, two));