Various patches and improvements

Isn't `CairoBackgroundRenderer::setMimeData()` a better place to count images? Overriding `drawImage()` may also work.