Issue #4986: May exceed the maximum margin of rect

1. Modify the judgment method
2. To rotate a picture Canvas moves from CCSpriteFrameCache to CCSprite