Fix crash if KWindowSystem::mapViewport is called without a QCoreApplication
Review Request #126887 - Created Jan. 26, 2016 and submitted
NETRootInfo can be used without requiring a QCoreApplication. But there are calls into KWindowSytem to check whether viewports are used. This creates a static container and tries to move it to the main thread of the QCoreApplication. If we don't have a QCoreApplication this crashes. This change ensures that it's possible to call into mapViewport even if there is no QCoreApplication. It will return false as also no plugin will be loadable. The change comes with a new auto test which simulates the condition of calling into mapViewport without a QCoreApplication.