[SPARK-3458] enable python "with" statements for SparkContext

allow for best practice code,

```
try:
  sc = SparkContext()
  app(sc)
finally:
  sc.stop()
```

to be written using a "with" statement,

```
with SparkContext() as sc:
  app(sc)
```
accordning to https://docs.python.org/2/library/unittest.html#assert-methods assertIsNone and assertIsNotNone are new to python 2.7 and my (potentially incorrect) understanding is we want to target 2.6.

thoughts?