[SPARK-4183] Close transport-related resources between SparkContexts

A leak of event loops may be causing test failures.
Since the shutdown code isn't in a `try-finally` block or `after()` function, I guess it's still possible that it won't be called when tests fail.  So, one test failure still might trigger spurious failures of later tests.