[WIP][SPARK-2179][SQL] Public API for DataTypes and Schema

The current PR contains the following changes:
* Expose `DataType`s in the sql package (internal details are private to sql).
* Introduce `createSchemaRDD` to create a `SchemaRDD` from an `RDD` with a provided schema (represented by a `StructType`) and a provided function to construct `Row`,
* Add a function `simpleString` to every `DataType`. Also, the schema represented by a `StructType` can be visualized by `printSchema`.
* `ScalaReflection.typeOfObject` provides a way to infer the Catalyst data type based on an object. Also, we can compose `typeOfObject` with some custom logics to form a new function to infer the data type (for different use cases).
* `JsonRDD` has been refactored to use changes introduced by this PR.
* Add a field `containsNull` to `ArrayType`. So, we can explicitly mark if an `ArrayType` can contain null values. The default value of `containsNull` is `false`.

An example of using `createSchemaRDD` is shown below.
```scala
import org.apache.spark.sql._
val sqlContext = new org.apache.spark.sql.SQLContext(sc)

val schema =
  StructType(
    StructField("name", StringType, false) ::
    StructField("age", IntegerType, true) :: Nil)

def convertToRow(record: String): Row = {
  val items = record.split(",")
  Row(items(0), items(1).trim.toInt)
}

val people = sc.textFile("examples/src/main/resources/people.txt")
val peopleSchemaRDD = sqlContext. applySchema(people, schema, convertToRow)
peopleSchemaRDD.printSchema
// root
// |-- name: string (nullable = false)
// |-- age: integer (nullable = true)

peopleSchemaRDD.registerAsTable("people")
sqlContext.sql("select name from people").collect.foreach(println)
```

I am working on the following things.
* Add a method to let user optionally validate the schema of a `SchemaRDD` by checking every row.
* Python and Java APIs.
* Add needed tests.
* Add needed docs.

JIRA: https://issues.apache.org/jira/browse/SPARK-2179
Oh, right, it does not make sense to have both a samplingRatio and a schema.