Build universal go binaries on macOS
That is required to enable CI configurations that test universal
binaries.
Previously the go servers were only build using the host CPU
architecture.
To avoid code duplication, move the logic into a helper CMake
function.
Update the code of the functions in such way that it outputs the
compiled binaries into CMAKE_CURRENT_BINARY_DIR instead of the
source dir. This allows us to remove the POST_BUILD commands that
copie the binaries.
Fixes: QTBUG-141860
Change-Id: I2ab4f64ffa4ff9898d2a84abd24b7e462a62e58c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>