trim-single-swapbuffers: Generate reference image during test

Previously, we were using a reference image generated with an Intel
device.  This led to failures when testing on other devices where the
trimming was correct, but the final image differed due to changes in
rasterization.

Instead, we now simply capture the images live, before and after
trimming, and ensure they are identical.