Change long to size_t or int

1. use `size_t` in `ccCArray`
2. use `size_t` for data length, such as used in `Image` and `Texture2D`
3. change` long` to `int` in some places
4. fix some warnings and hungarian