qmake: share the default variables

Eliminate duplicate code => collect the default variables
to MakefileGenerator::writeDefaultVariables().

Task-number: QTBUG-21910
Change-Id: Ia03ce0240dd9a101ad9d35db636cd88f38a49320
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Automatically enable precompiled headers for Qt modules

We'll use the master depends header for the module as the precompilation
header. We could use the master include, but tests show that
precompilation benefits taper off for big precompiled headers. The
important part is to get the Standard Library headers precompiled.

Each module can still override which header to precompile by setting
PRECOMPILED_HEADER after load(qt_modules). It can also turn off
precompiled headers by setting that to empty or by CONFIG -=
precompile_header.

Testing a few build times shows the following improvements (GCC 4.8 with
-O3 and C++11):
  QtPrintSupport: 14.7%
  QtOpenGL:       22.7%
  QtDBus:         29.5%
  QtSvg:          -2.4%
  QtXmlPatterns:  26.1%
  QtQml:          21.6%
  QtQuick:        25.0%
  QtMultimedia:    9.0%
  QtSerialPort:  -30.0%
  QtHelp:          5.6%

The numbers also show that precompilation is worse for small modules.

Change-Id: I3793fafcedaff5456527cd6b3777ffd162975c36
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Add support for single-file multi-target intrinsics in Qt

GCC 4.9 now allows us to #include any and all intrinsics headers, not
just the one for which we're compiling code, a behavior that ICC and
MSVC have had for some time. With that, we're able to have the functions
for different targets in the same source file. See the GCC manual:
  http://gcc.gnu.org/onlinedocs/gcc/Function-Multiversioning.html

This functionality is notified by the QT_COMPILER_SUPPORTS_HERE(XXX)
macro, which indicates that all the intrinsics from
QT_COMPILER_SUPPORTS_xxx are available and enabled. To complement, a
QT_COMPILER_SUPPORTS(XXX) macro is also added.

Unlike ICC and MSVC, GCC requires a special function attribute, which
will also cause code optimization. That's the QT_FUNCTION_TARGET macro.

Note: because of the absence of the target attribute, ICC and MSVC will
not generate instructions with the VEX prefix unless they only exist
with the VEX prefix or if -mavx / -arch:AVX are enabled.

Change-Id: I0c1880c20324bd8e0fc68a863e36d1fa7755dff0
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Detect the CRC32 instruction availability at runtime

This requires being able to compile the SSE4.2 instruction at compile
time without changing compiler command-line flags. This code will get
enabled for GCC 4.9, ICC and MSVC.

Change-Id: Ifb9158ff7f49e6ae581297893cd1e21dd5ce3573
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>