Enhance logcapture plugin: attach data to test.

Allow other plugins (such as output formatters) to use log data
programmatically, even for successful tests.