Port Cocos2D-X to Qt 5 (develop branch)

This is basically the same as pull request #3225, but rebased against the "develop" branch and fixed so that it builds with all the changes in "develop".