Select the first test fingerprint for a test name for forked tests

This takes the 'distinct by name' filtering which is applied to in-process tests and makes it available to forked tests (by moving it to Tests.processOptions which is used in both in-process and forked).

The test from the original commit for the filtering (https://github.com/sbt/sbt/commit/a0e301e) is extended to also test when forked, and this test fails without the other changes.

This resolves junit tests being run twice as reported in https://github.com/sbt/junit-interface/issues/14, for at least some of the test samples.