[CALCITE-443] getPredicates from a union is not correct
Make it more convenient to unit test RelMetadataQuery, and add some more tests for [CALCITE-443].