[FLINK-1112] Add KeySelector group sorting on KeySelector grouping

The sortkey must also be remembered.