MINGW: Define variable based on ABI check instead of compiler id

The `MINGW` variable indicates that the compiler targets MinGW, a GNU
ABI on Windows.  Since the compiler's target may be affected by flags
known only after compiler identification, delay defining the `MINGW`
variable until the ABI detection step.

Also remove the now-unused undocumented `CMAKE_COMPILER_IS_MINGW`
internal variable.

Fixes: #22647
32 jobs for !6532 with platform-vars in 69 minutes and 44 seconds (queued for 2 seconds)
latest merge request