Collect output into a String. It also passes on the output to the underlying PrintStream. E.g. will capture stuff sent to sys-out, but also pass it on as normal. This uses {@link System#setOut(PrintStream)} to capture System.out.Use {@link #toString()} to get the output.
By default, this only collects output sent from the thread which created it!
Remember to {@link #close()} this object after use.TODO multi-threaded use is dubious :( Either come up with a better design, or use sparingly
@author daniel