Introduce the desktop/app check and try to cleanup this header and add w8 stuff.

git-svn-id: https://mingw-w64.svn.sourceforge.net/svnroot/mingw-w64/trunk@5636 4407c894-4637-0410-b4f5-ada5f102cad1