Fix the "threads" test

The "threads" test was failing sometimes on all tested platforms
because the output.j5 file would sometimes show that three tests were
run by a single thread (i.e., the two test cases that belong to the
serialization set, along with an extra test case).  This is expected
behavior based on the way that serialization sets are assigned to
thread numbers (the thread number for a serialization set is determined
solely based on information available at program initialization, before
any test cases are run, while the test cases themselves are not prioritized
based on whether they can be run in parallel or not).

The test case has been fixed by ignoring any tests in the output
that do not belong to the serialization set.