MAINT: Get rid of a ResourceWarning.

This one in numpy/distutils/system_info.py. Just keep an explicit
reference to a file, then close it.
TST: Get rid of a ResourceWarning.

I'm not sure this is the right fix, but test_closing_fid need to check
that garbage collection will close a file that goes through a bunch of
openings followed by dropping the reference. So the fix is to ignore
warnings during the test. I'd just ignore ResourceWarning, but it does
not look to be a built in warning in Python 2.7.
Merge pull request #3114 from charris/fix-resource-warnings

Fix resource warnings