[FLINK-984] Extension of the API for distinct for Key Expressions, additional testcases

I extended the API for the distinct operator to also work on POJOs using either key expressions or by using plain distinct() selecting all public fields.
I also added some more testcases for the operator.