Add version detection for gcc-10 to ./configure
Add version detection for gcc-10 to ./configure

Summary:
Change sed commands to allow multiple digits in gcc major version.

Remove special case for gcc-2 - gcc-4.  We do not use these old
compiler versions anymore, and their special case makes the sed
command harder to read.

Extract compiler version detection into function to avoid
duplication.

Closes T1145.

Test Plan:
gcc -dumpversion produces the following outputs on our build platforms:

| 4.8 | 5.4.0 | 7 | 8.3.0 | 9 | 10.1.0 |

(see T1145#20281.)

The sed skript produces the following values for GCC_VER from these:

| 4.8 | -4.8
| 5.4.0 | -5
| 7 | -7
| 8.3.0 | -8
| 9 | -9
| 10.1.0 | -10

(tested with this bash skript:)
```
for dumpversion in 4.8 5.4.0 7 8.3.0 9 10.1.0
do echo -n "| $dumpversion | "
   echo $dumpversion | sed -e 's/.*[[:blank:]]//' -e 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/-\1/' -e 's/^[0-9]/-&/1'
done
```

Reviewers: pmaanen

Reviewed By: pmaanen

Maniphest Tasks: T1145

Differential Revision: https://dev.openmha.org/D410

HoerTech-gGmbH/openMHA,HoerTech-gGmbH/openMHA,HoerTech-gGmbH/openMHA,HoerTech-gGmbH/openMHA,HoerTech-gGmbH/openMHA,HoerTech-gGmbH/openMHA,HoerTech-gGmbH/openMHA,HoerTech-gGmbH/openMHA