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

maybe we should push this into spark core directly?