[WIP][SPARK-2554][SQL] CountDistinct and SumDistinct should do partial aggregation

It ensures that we return the aggregate function itself (and its data) to the next phase instead of its result. (i.e., `Set(1,2,3) instead of 3` for `CountDistinct`).