[SPARK-4336] [SQL] support type auto detection from json string

This is for [comment](https://github.com/apache/spark/pull/3012#issuecomment-61222405) from @davies in #3012 
By this patch, we can detect TimestampType and DateType from a json string.
Okay, I will use regex to judge then.