Better testsuite cross-platform robustness by allowing multiple matches.

This is actually porting some guts from the runtest.py from OSL's
testsuite, which had the clever strategy that, if an output doesn't
match its version in the ref directory, will test against every other
file in the ref directory hoping for a match.  This means you can have
multiple references, if for some reason you expect them to differ a bit
per platform and have no other good way to rectify it.
Alternate reference that seems to be necessary on some platforms, probably due to different libjpeg implementation