[SPARK-4318][SQL] Fix empty sum distinct.

Executing sum distinct for empty table throws `java.lang.UnsupportedOperationException: empty.reduceLeft`.
No, the `calcType` is for `Divide`.
If the `expr.dataType` is fixed-precision decimal, once cast to `DecimalType.Unlimited` for division and then cast back to fixed-precision using `Average.dataType`, which returns correct data type.