add support for passing options to the reporter
add a done() method to the reporter API to give it a chance to clean up
asynchronously at the end of all tests
add support to the xunit reporter to optionally write to a file
Tweak error handling
Change the reporter.done() calling convention

Previously I implemented a no-op done() method in the Base reporter class.
This is a slight simplification to make the caller responsible for checking
whether the done() method exists and only call it if it does.

The main benefit is that if a reporter class is used that doesn't actually
inherit from Base but simply implements the expected API then it will still
work even after merging the change.