Equality and hash functions for Tolerance and Test classes.

Compare everything in Tolerance objects but only compare key data
affecting running the test (e.g. not the test name) for Test objects.

Note that this means that duplicate tests, which can arise from being
matched by two or more globs in jobconfig, are removed in select_tests
by the use of set.