fix sprite frame cache, and remove unnecessary headers dependencies.

we should add private headers for ccs, do not expose privae headers to users.
revert some modifications.
fix compile error.
fix momery leak (partly fix, memory leak still exist).
- Optimization in CCClippingNode.
Disable visiting when no objects has to be drawn under stencil.
- set const modifier to ClippingNode::hasContent()
Permit plugin-x plugins to ship third-party libraries.

Ignoring the libs directory's .jar files is strange. I'm not sure
whoever put the total block over libs/ knew that this is the standard
Android library directory and not just for NDK-compiled assets.

More granular ignores over libs/ contents would be better in the
future, but this fixes the odd sdk/ directory hack plugins currently
use and lets the Android build system auto-link libraries that're
shipped with plugins instead of forcing Cocos developers to manually
sift through a plugin's Android dependencies and include them by hand.
Modify the cpp template & tests to support compiling wp8-xaml & win8.1-universal project by console.
Unify usage of prebuilt libraries in cmake builds.

* introduce config variable USE_PREBUILT_LIBS (default: ON). When OFF, cmake will not use prebuilt libs, only try find system installed libraries.
* FindGLFW3.cmake now search our prebuilt library (if USE_PREBULT_LIBS)
* FindFreetype.cmake also

This and next changes should simplify our CMakeLists.txt files and USE_PREBUILT_LIBS config allow external package developers to integrate cocos to their packaging system.
Unify WebP usage.
Fix WebP usage.

* Introduce config variable USE_WEBP (ON by default, but disabled for unsupported archs WINRT and WP8)
* Set CC_USE_WEBP define according to USE_WEBP variable
* add WebP include directories to search patch only for libcocos compilation (it not used in public headers)
Unify usage of chipmunk library

* cmake/Modules/FindChipmunk.cmake now can find prebuilt chipmunk libs
* follow USE_CHIPMUNK variable (although at the moment cocos can't build without chipmunk)
* come cleanups and formatting
Try to fix building without chipmunk, by define CC_USE_PHYSICS=0, but lua bindings still fail.
Improve FindFreetype.cmake for Mac
Unify TinyXML2 usage.

* should be included as simple "tinyxml2.h", but on some files was "tinyxml2/tinyxml2.h", replace this.
* Add cmake/Modules/FindTinyXML2.cmake
* As tinyxml2 for now has not prebuilt, instead sources included, add their as subdirectory if USE_PREBUILT_LIBS
Make FindTinyXML2.cmake use included macroses from same directory, as other our Find*.cmake modules
Unify Box2D usage and finding (not compilable, may be fix that later...)
Use COCOS_EXTERNAL_DIR in Find*.cmake modules
Compile Box2D tests only if library used in cocos.
Add custom FindJPEG.cmake module.