Closed #5813: refactor codes of cc.Sprite.setBlendFunc and cc.LayerColor.setBlendFunc

Refactor codes of cc.Sprite.setBlendFunc and cc.LayerColor.setBlendFunc