[FLINK-925] Support KeySelector function returning

Tuple types can be returned by the KeySelector. Enabling tuple types to be used as KEY for grouping.

Added test cases using TupleComparatorTestBase. Testing Tuple3<Tuple2,Tuple2,Tuple2>.