Factor out common code in compiler detection
Factor out common code in compiler detection

This was being duplicated across C/C++/ObjC/ObjC++/Fortran and hence
was behaving slightly differently in each.

mesonbuild/meson,wberrier/meson,rhd/meson,becm/meson,wberrier/meson,trhd/meson,jpakkane/meson,QuLogic/meson,pexip/meson,wberrier/meson,becm/meson,mesonbuild/meson,MathieuDuponchelle/meson,MathieuDuponchelle/meson,pexip/meson,rhd/meson,trhd/meson,mesonbuild/meson,jeandet/meson,pexip/meson,thiblahute/meson,mesonbuild/meson,rhd/meson,thiblahute/meson,MathieuDuponchelle/meson,thiblahute/meson,wberrier/meson,jeandet/meson,mesonbuild/meson,mesonbuild/meson,trhd/meson,jeandet/meson,thiblahute/meson,fmuellner/meson,wberrier/meson,trhd/meson,jeandet/meson,QuLogic/meson,mesonbuild/meson,ernestask/meson,ernestask/meson,QuLogic/meson,thiblahute/meson,QuLogic/meson,becm/meson,fmuellner/meson,pexip/meson,QuLogic/meson,becm/meson,wberrier/meson,jpakkane/meson,rhd/meson,ernestask/meson,aaronp24/meson,becm/meson,jpakkane/meson,ernestask/meson,jpakkane/meson,ernestask/meson,MathieuDuponchelle/meson,jpakkane/meson,becm/meson,becm/meson,fmuellner/meson,ernestask/meson,pexip/meson,jeandet/meson,thiblahute/meson,becm/meson,QuLogic/meson,aaronp24/meson,MathieuDuponchelle/meson,MathieuDuponchelle/meson,jpakkane/meson,ernestask/meson,rhd/meson,aaronp24/meson,wberrier/meson,wberrier/meson,fmuellner/meson,pexip/meson,jeandet/meson,MathieuDuponchelle/meson,aaronp24/meson,jpakkane/meson,aaronp24/meson,trhd/meson,fmuellner/meson,pexip/meson,aaronp24/meson,QuLogic/meson,thiblahute/meson,thiblahute/meson,MathieuDuponchelle/meson,aaronp24/meson,jpakkane/meson,pexip/meson,fmuellner/meson,aaronp24/meson,pexip/meson,rhd/meson,mesonbuild/meson,mesonbuild/meson,trhd/meson,mesonbuild/meson,fmuellner/meson,fmuellner/meson,fmuellner/meson,rhd/meson,trhd/meson,jeandet/meson,jpakkane/meson,pexip/meson,trhd/meson,ernestask/meson,becm/meson,thiblahute/meson,jeandet/meson,ernestask/meson,becm/meson,QuLogic/meson,aaronp24/meson,trhd/meson,jeandet/meson,QuLogic/meson,MathieuDuponchelle/meson,rhd/meson