[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.
regex maybe is not fast enough, we still need some quick test to fail fast, such as check it contains some special characters?

Could you post some micro benchmark of it?