[improvedment]don't determine image format by file extensions

Many APIs determine image format by file extension, such as CCTextureCache, so we have to keep file extensions.

But on some mobile phones, any images will be displayed in gallery app, that exposes our resources.
Even more, users might delete these images, cause our games could not run normally.

Another scenario, we have to download images from web servers(eg, avatar of facebook user), and the url usually doesn’t endswith ‘jpg’ nor ‘png’.
If it’s a jpg file, it cann’t be displayed properly.

Did you mean we should determine file type by its content?
I think we can have a try.

Thank you.
#1378 is created for it.