Issue #5096: refactor renderer's codes for more maintainable

1. refactor renderer's codes for more maintainable
2. fix a bug of cc.LayerColor that its setColor is incorrect.