test:  Use only a clipped portion of screenshot for comparisons

Allow tests to define a clipped portion of the screen to look at when
comparing rendered output to reference images.  This has two benefits.
First it allows us to exclude areas of the screen we don't care about
(e.g. the clock).  Second it makes the reference images much smaller in
git (since the masked out areas compress down to just a few bytes).