merge code from develop to make CCImage::initWithImageFileThreadSafe() thread-safe
Merge pull request #3763 from minggo/merge-thread-safe

make CCImage::initWithImageFileThreadSafe() thread-safe