use onWindowFocusChanged(bool) instead of onResume()/onPause()

we should use onWindowFocusChanged(bool) to detect if the app is currently
visitible to the user or not. because onPause()/onResume() leads to false
positives on some android versions (e.g. Kindle Fire). if you lock those
devices, while the app running, everything is fine (onPause() is handled
properly). but as soon as you wake up the device, and the lock screen gets
visible, the app is resumed and the music is played (onResume() is
called to early).

this is a) not the best behaviour and b) such games will be rejected on the
samsung app store. onWindowFocusChanged(bool) is, like onPause()/onResume(),
available since API level 1 and it should be safe to simply switch.
fix CCScale9Sprite CapInsets bug for rotated sprite frame
closed #2388: Creating a default texture for CCSprite if setTexture(nullptr) is invoked.
Add append function for String class.

The append function is useful when adding a string.
So, I added it to String class.
issue #2388: Checking whether the texture exists.
issue #2388: One more static_cast.
closed #2390, Resolve the bug in modify game projects tools.
Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into develop
issue #2389: Adding cookie support for HttpClient
issue #2388: Updating comments for cc_2x2_white_image variable.
issue #2388: Fixing a bug in FadeIn::clone.
Merge pull request #3114 from dumganhar/iss2388-default-texture

closed #2388: Creating a default texture for CCSprite if setTexture(nullptr) is invoked.
Support Tizen 2.2 SDK.
- Update project files.
- based on develop branch.
- HelloCpp, SimpleGame, HelloLua, TestLua available to build.
issue #2300: A fix of missing invoking 'initXXX' in clone method.(FadeOut, DelayTime).
'tile' --> 'getTile', 'orignalTile' --> 'getOrignalTile'
Merge pull request #3123 from pyrasis/tizen_2.2

Support Tizen 2.2 SDK
closed issue #2386 : Fix bug : add a new method to clear the stencil buffer bit used by ClippingNode
closed #2390, Resolve the bug plugin/tools/config.sh.
Update .travis.yml
Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into develop