Improve detection of missing compiler flags: move "argument unused
during compilation: .*" pattern from language-specific branches into
the common list.
Fix a typo from commit 660e0d80ae (internal/CheckCompilerFlag: rely on
common configuration, 2022-01-12, v3.23.0-rc1~124^2~1) that caused
locale environment variables to not be restored after they are set
during the check.