SPARK-2626 [DOCS] Stop SparkContext in all examples

Call SparkContext.stop() in all examples (and touch up minor nearby code style issues while at it)
thanks, i learned something new and it's early on a monday - for others interested: http://docs.scala-lang.org/style/method-invocation.html