Add a ContextTestCase to testing.py

Builds on @kwmsmith's PR #392.

On the local side, we have an `MpiTestCase` that will create a communicator of a certain size if possible, and if not, it will raise a `SkipTest` (skipping tests that need more processes than currently available).  In this PR, I add a `ContextTestCase` that performs a similar function for client-side tests that use `Context`s.

Each test inheriting from `ContextTestCase` (rather than `unittest.TestCase`) can overload the class attribute `ntargets` (default 4) to specify how many engines are required to run that test.  If enough engines are available, a `Context` is created with `targets=range(self.ntargets)`.  This class manages setting up and closing this `Context`.   If too few engines are available, a `SkipTest` is raised.

In this PR, I also *use* `ContextTestCase` whenever possible, allowing the deletion of many `context.close()` statements and the closing of many `Context`s that didn't have such statements.  I have successfully run our test suite with numbers of engines ranging from 1 to 14.

We might consider adding testing with different numbers of engines to TravisCI.  We could probably even do this parallel by setting up a test matrix.

Update:

I added a `check_targets` function to `testing.py` to consolidate the error messages we use when skipping individual tests.