Make the thread_barrier_test a conditional test.

When I added this test recently I forgot to make it condition on any grade
with a par component, or the java and csharp grades.  This patch fixes this.

tests/hard_coded/Mmakefile:
    As above.