[FLINK-925] Support KeySelector function returning Tuple types
[FLINK-925] Extended for distinct operator and added test cases

This closes #59