Add TAP compatible output.

This adds an option to the test runner to output [TAP](http://testanything.org/wiki/index.php/Main_Page) compatible results. This will help when testing with automake.

Note, though, that this is based on my previous pull request, so you'll probably want to merge that one first.