[eclass] Refactor GCC version check and run at both pkg_pretend and pkg_setup.

In KDE 4, the check was run in pkg_pretend only for kdelibs to save time during
dependency resolution (think merging 300+ KDE pack ages all at once).

Since there's no equivalent package in which to do this trick and we require a
very recent version of GCC, it's quite likely to hit this check. To avoid dying
halfway through a merge let's just do it properly and bail out as early as
possible

In order to reduce the speed impact, the version check has been reworked to use
only one of the traditional three version calls.