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

Will that cause exception if its subclass only contains the no-args constructor? e.g. the class `Rand`.