[FLINK-925] Support KeySelector function returning Tuples

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