MAINT/TST: refactor and test packbits/unpackbits

Pushes the GIL release one loop outward. First test for these functions (!).

Incorporates suggestions by @jaimefrio and @charris.
ENH ensure np.packbits works on np.bool dtype
BLD: Change Fortran version flag and string check

The version check flag for GnuFCompiler and Gnu95FCompiler were changed from
`--version` to `-dumpversion`. This simplifies the gnu_version_match code for
gfortran, and makes it possible to drop much of the check code for g77 as
well. This fix addresses issue #5315 and #5321.
Merge pull request #5333 from rnelsonchem/comp_exe

BLD: Change Fortran version flag and string check
Merge pull request #5319 from larsmans/c-fixes

MAINT: refactor packbits/unpackbits