Refactor UIButton and Enable Direct Setting of Sprite Frames.

The current code for UIButton has a lot of repetitions. Refactored it and allowed setting of SpriteFrame in images (02ccfe0cf408136fec2c824fc9d2e811448c6c54).