[SPARK-3988][SQL] add public API for date type

Add json and python api for date type.
By using Pickle, `java.sql.Date` was serialized as calendar, and recognized in python as `datetime.datetime`. 
@davies because of using pyrolite, `java.sql.Date` is serialized in the same way as `java.sql.Timestamp`, since they are all subtype of `java.util.Date`. And this make the `dumps()` function to generate datetime instead of date for `java.util.Date`. I think this is related to your comments in JIRA SPARK-2674