fix string size check and assert condition

1. std::string::size() return size_t (is never < 0)
2. "event must be larger than 0" and 'event' has unsigned int type
Merge commit 'refs/pull/5289/head' of git://github.com/cocos2d/cocos2d-x into merge5289

Conflicts:
	cocos/2d/platform/win32/CCImage.cpp
Merge pull request #5375 from dumganhar/merge5289

Merge PR #5289: fix string size check and assert condition