quartz: Improve use of images for better performance.
Following @psychon's suggestion to re-do the image-caching patch with one that uses cairo-surface-snapshot leads to replacing most image creation with returning the snapshot, removing the need to keep an image as part of cairo_quartz_surface_t. Profiling showed a substantial performance penalty to using CGContextDrawTiledImage, but removing it caused some test failures that needed to be worked out, so I did a little refactoring to make the code easier to understand, and so that the debugging image dump no longer needs Qt.
Serendipitously one commit made an expected-fail test (pdf-operators-text). Removing CGContextDrawTiledImage caused human-imperceptible changes in the mask and trap-clip tests that I wasn't able to find a cause for, so I replaced the reference images with new ones.
Replaces !270 (closed) except that it leaves out the CGFont->CoreText commit. I'll make a new PR for that and some compiler warning fixes.