added support for msys2 mingwtoolchains and fix x64 cocos/audio on windows platform for MSVC and Mingw. Also fixed a few very bad type casts very important for future Arm64 bit processors
fixed CCImage for MSVC someone added std:tolower which broke it
removed unneeded directories for Mingw cmake
replace long with int or ssize_t
use int in Vector
initialize static member variable in cpp
UserDefault::setDataForKey on android will cause memory leak
Merge pull request #4438 from minggo/change-long

replace long with int or ssize_t
use Schedule::performFunctionInCocosThread
Merge pull request #4441 from xhcnb/mem_leak_android_userdefault

[ci skip]UserDefault::setDataForKey on android will cause memory leak
Merge pull request #4434 from martell/msys2

Msys2 and Mingw added fixed x64 cocos/audio on Windows for MSVC and MinGW
Merge pull request #4442 from minggo/use-schedule

use Schedule::performFunctionInCocosThread
Merge branch 'develop' of git://github.com/cocos2d/cocos2d-x into iss2790-template-container