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.
Yes. That search patter will look for 1 or more characters from the set of numbers from 0-9, a period, and a hyphen (`-`). It seems that some of the tests have version numbers that look something like `#.#.#-#`. However, on closer inspection, that version match will never be the first one in the regex search, so perhaps the hyphen check is irrelevant. I'm not sure how important it is to have that information in the version string.