Fix compilation errors in mg.c with MinGW/gcc -xc++

error: 'sip' was not declared in this scope
error: 'uap' was not declared in this scope
Fix compilation errors in win32.c with MinGW/gcc -xc++

In MinGW-w64 builds, there are warnings/errors like this (depending on the
compiler version used):

gcc-4.5.3:
warning: passing argument 2 of 'execv' from incompatible pointer type

gcc-4.8.0:
error: invalid conversion from 'const char* const*' to 'char* const*'

This happens because MinGW-w64's process.h declares execv/execvp's second
argument as 'char * const*' instead of 'const char * const*'.
The _execv/_execvp versions don't have this problem so use them instead.
MSDN says execv/execvp are deprecated POSIX functions; use the ISO C++
conformant _execv/_execvp instead anyway so it is not even worth sticking
with execv/execvp for those compilers (namely, MinGW and VC++) that have
the correct declarations.

Likewise with spawnv/spawnvp vs. _spawnv/_spawnvp.
Fix compilation errors in win32sck.c with MinGW/gcc -xc++

error: invalid conversion from 'const timeval*' to 'PTIMEVAL'
Fix compilation errors in DynaLoader.c with MinGW/gcc -xc++

error: invalid conversion from 'void*' to 'HMODULE'
Fix compilation errors in globals.c with MinGW/gcc -xc++

error: external linkage required for symbol 'PL_charclass' because of
'dllexport' attribute

and likewise for many other symbols declared EXTCONST.
Fix link error in perl521.dll with MinGW/gcc -xc++

perl.exp:fake:(.edata+0x1214): undefined reference to `win32_async_check'