Automatically link to the qtmain library when linking to QtCore.

When using QAxServer, ensure that the qtmain library is excluded
by reporting an error at CMake time if it is not.
Merge topic 'qt4-autolink-qtmain' into next

e3b5eb6 Automatically link to the qtmain library when linking to QtCore.