fixes memory management in UIImageJPEGRepresentation

Previously, converting certain PNG images to JPEG could crash deep in the
bowels of CoreGraphics/ImageIO/libJPEG.
uses CFType callbacks for gradient colors array
Merge pull request #2 from bignerdranch/fixes-cf-collection-usage

fixes CoreFoundation collection usage