SPARK-4228 SchemaRDD to JSON

Here's a simple fix for SchemaRDD to JSON.
Format multi-line lambdas like this:

```scala
v.foreach { p => 
  gen.writeFieldName(p._1.toString)
  valWriter(vv,p._2)
}
```