Refactor FilterJoinRule so you can supply a predicate rather than sub-classing.

Add test case for [CALCITE-448] (not fixed yet).

In RexProgramBuilder, simplify AND(x, x) to x (not enabled).
Detect and merge duplicate predicates 'AND(x, y, x)' to 'AND(x, y)' in more circumstances

Make flattenAnd and flattenOr more efficient on empty lists.