Deleting duplicate code in tests

This is a start of a background effort to improve the tests. So far it simply deletes duplicate and unused code.

The plans are
- ensuring that diffs and errors are always printed during a build
- getting rid of DejaGnu/TCL where possible
- enabling parallelization