[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)
```
Yeah, I know :( .  Unfortunately, Python 2.6 is still the default Python version on a lot of Linux distributions, so we've been trying to maintain backwards-compatibility in order to ensure a good out-of-the-box experience for those users.