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

JIRA: https://issues.apache.org/jira/browse/SPARK-2060
Relatedly, can we add a few tests for type promotion?  @aarondav has been running into some issues with the current implementation.