Fix a ResourceWarning in test_shared.

Thanks to Arfrever for the patch.  This fixes #593.
Fix a ResourceWarning in test_entrypoints.
Fix a ResourceWarning in test_xunit.
Get rid of another ResourceWarning in test_skips for the xunit plugin.
Fix a ResourceWarning in init_plugin.rst.
Merge branch 'fix-resource-warnings' into 1.3.0-candidate

This fixes most, but not all, of the ResourceWarnings under 3.2 and 3.3.