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.
issue #2393:mark functions in CCPointExtensions deprecated
Implements a socket.io client extension, adds a test case and updates the android makefiles.

Contains the following tasks:
-initial socket.io extension commit
-sioclientimpl subclasses websocket:delegate to respond to websocket events
-implement static connect methods and basic client creation
-move SocketIO class files into correct extension folder (network)
-create SocketIO test in TestCpp
-update project references
-add missing static modifier to connect method
-implement basic test methods
-update extensions tests with SocketIO test entry
-implement basic handshake and opensocket methods for SocketIO
-add Delegate class to handle callbacks, implement virtual Delegate methods in test
-implement socket and client registries for lookup when connecting to hosts and endpoints
-connect delegate onOpen method by separating impl creation from connection
-update test to demonstrate onOpen callback
-create send and emit methods, move SIOClient into header file, add send and emit methods to test
-implement basic socket.io message parsing
-improve logging for events and messages
-add logic to pull event name from payload
-schedule heartbeat to keep connection alive, scheduled for 90% of the heartbeat interval from the server for safety
-add onConnect handler to to catch socket.io onconnect vs websocket onopen
-add disconnect and disconnectFromEndpoint methods to properly disconnect and destroy objects
-modify SIOClientImpl to track _uri for easier lookup in registries
-connect handler for onMessage to message event from socket.io, modify onError handler to take a string instead of WebSocket error code
-create SIOEvent callback type, implement event registry in clients, add test for event registration and callback
-update SIOEvent to use std::function and c++11, utilize cocos2d CC_CALLBACK method to bind selectors, this ensures that the *this reference is properly passed
-check for connect before sending or emitting in the client, cleanup some codes
-change connect logic to reuse existing socket connections instead of opening a new one
-implements get and set Tag methods for clients for easy reference
-improve endpoint handling, add endpoint tests to test layer
-additional error handling within socket disconnect error and failure to open connection
-fixes extracting endpoint from socket.io messages (in cases of the connect message, where there is 1 less colon for the connect message to the default namespace). Also fixes connecting to the default namespace "/" in the connectToEndpoint method
-add disconnect and onClose handlers to client so that onClose is called in the delegate
-add disconnect test methods to test layers
-change c-style casts to static_casts when using a CCDICT_FOREACH
-remove some unneeded namespace completion
-add usage documentation
-add handling for disconnect from server, cleanup some codes
-update comments and documentation in the socketiotest
-update includes so the NDK doesn't complain when compiling with c++11
-add socketio.cpp and test.cpp to the android makefiles
-update test URL to my public server, test script can also be found in my repo at https://github.com/hannon235/socket.io-testserver.git

Signed-off-by: Chris Hannon <himynameschris@gmail.com>
issue #2393:mark ccp as deprecated
issue #2393:mark CCPointMake CCSizeMake CCRectMake as deprecated
issue #2393:mark PointZero RectZero and SizeZero as deprecated
closed #2393: fixed conflicts
closed #2393:fix some warnings
Merge pull request #3139 from dumganhar/iss2397-getInstance

Merge PR https://github.com/cocos2d/cocos2d-x/pull/3136
closed #2398: [MAC] Adding Support for initializing Image with raw data. Otherwise, Sprite with no texture can't be created with default 2x2 texture which is RGBA raw data.
[AUTO] : updating submodule reference to latest autogenerated bindings
issue #2398: Trigger an assert when the default texture of Sprite was created unsuccessfully.
Merge pull request #3141 from CocosRobot/updategeneratedsubmodule_1373618127

[ci skip][AUTO] : updating submodule reference to latest autogenerated bindings
Merge pull request #3142 from dumganhar/iss2398-mac-raw-data

closed 2398: [MAC] Adding Support for initializing Image with raw data.
Updating cocos2dx.ini, ignore "FileUtils::purgeFileUtils" for JSB.
[AUTO] : updating submodule reference to latest autogenerated bindings
Merge pull request #3143 from CocosRobot/updategeneratedsubmodule_1373619704

[AUTO] : updating submodule reference to latest autogenerated bindings [ci skip]
closed #2393: fix conflicts
closed #2393:fix a compiling error
closed #2393:revert some wrong modification when fix conflicts