This is a more complete patch to add the test harness.
The only parts missing now are the language bindings (except OCaml).
The language bindings need a bit more thought. At the moment most
language binding tests are done through some sort of shell script like
perl/run-perl-tests which either runs each test itself or uses some
language-specific machinary to run each test. The problem with that
is the test harness should be running individual tests, otherwise we
cannot parallelize them, nor run fast-only tests. That won't work
however until the test harness knows how to run language tests, which
it doesn't at the moment (except for OCaml).
In any case, this is now ready for review, and maybe inclusion
upstream.
Rich.