port useful builtin qmake functions to Qt4. qtCompileTest works

TODO:
1. shell_quote, system_quote are not finished
2. win32 msys may need qmake twice, the first QMAKE path is not right in
Makefile
3. other qmake builtin functions in qt5
add a script to generate config tests
config.test: add ffmpeg, portaudio, d2d, gdi+
enable compile tests for qmake. tested on windows mingw(with/without
msys) and vc