Bug 1054326: Initial attempt to submit Imagecompare test framework and test cases int...

...o the main branch
There's quite a bit of duplication here with the reference images gathering. I wonder if we could combine these two methods? The difference appears to be the destination folder and the filename, but we can make those conditional based on the boolean to gather reference images.