[SPARK-4270][SQL] Fix Cast from DateType to DecimalType.

`Cast` from `DateType` to `DecimalType` throws `NullPointerException`.

Author: Takuya UESHIN <ueshin@happy-camper.st>

Closes #3134 from ueshin/issues/SPARK-4270 and squashes the following commits:

7394e4b [Takuya UESHIN] Fix Cast from DateType to DecimalType.

(cherry picked from commit a6405c5ddcda112f8efd7d50d8e5f44f78a0fa41)
Signed-off-by: Michael Armbrust <michael@databricks.com>