Make RelCollation a trait. This will allow us to ask for relational expressions that are equivalent (i.e. in the same set) but have different sort order. And will allow us to apply a converter (i.e. an OrderRel) to create a rel with the desired sort order.

RelCollation is the first trait where it is reasonable for a given RelNode to have 2 instances of the trait. For example, the TableAccessRel(table='TIME_BY_DAY') might be sorted by {the_year, the_month, the_date} and also by {time_id}. That particular TableAccessRel would belong to two subsets in the same set. That confuses the current RelSubset data structure, which assumes that a RelNode is in precisely one RelSubset. We've fixed it by moving the lists to RelSet. The lists of rels and parents in RelSubset are now computed on the fly.
Make sortedness a trait, and add a rule, RemoveSortRule, that implements ORDER BY by finding a rel that is already sorted. SortRel is now defined by a RelCollation, not a List<RelFieldCollation>, although they are fairly similar in content. (Most of the functionality is disabled in this commit.)
Fix a few issues with collation as a trait.
Make sortedness a trait, and add a rule, RemoveSortRule, that implements ORDER BY by finding a rel that is already sorted. SortRel is now defined by a RelCollation, not a List<RelFieldCollation>, although they are fairly similar in content. (Most of the functionality is disabled in this commit.)
Make sortedness a trait, and add a rule, RemoveSortRule, that implements ORDER BY by finding a rel that is already sorted. SortRel is now defined by a RelCollation, not a List<RelFieldCollation>, although they are fairly similar in content. (Most of the functionality is disabled in this commit.)
Progress on collation trait. Only a couple of test failures left.

Add RelOptPlanner.getRelTraitDefs(); deprecate RelOptRuleCall.getRels().
Fixes for collation as a trait.

Convert a few methods (e.g. ProjectRel.<init>) to take lists rather than arrays.
Revert to snapshot version number.