Added check_gcc_config_and_reset_if_necessary function,
since the gcc-config not being set correctly (or getting
unset after an @world upgrade / depclean) appears to cause
quite a lot of hard-to-track-down problems.