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).
rename functions.
Merge pull request #9050 from joewan/fix-armature-spriteframe

fix sprite frame cache, and remove unnecessary headers dependencies.