Fix distinct on non-comparable type

Solves issue:
https://github.com/facebook/presto/issues/1931