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)
Yes, all intentional. Parens should be used in Scala when methods have side effects, and @Override should be used in Java where an override is intended. These are just small matters of style but think worth standardizing to match other source and common practice while changing nearby code.