[Spark 2060][SQL] Querying JSON Datasets with SQL and DSL in Spark SQL

JIRA: https://issues.apache.org/jira/browse/SPARK-2060

Programming guide: http://yhuai.github.io/site/sql-programming-guide.html

Scala doc of SQLContext: http://yhuai.github.io/site/api/scala/index.html#org.apache.spark.sql.SQLContext
There are a few places where we need to do `.asInstanceOf[Map[String, Any]]` or `.asInstanceOf[Seq[Any]]`. So, I think it may be better to convert types of those collections in a row at the same place.