checks: change parse_output interface

pass an allocated struct instead, this allows us to discard (free) it
from parse_check_output - which is only interested in the fields of
struct for backwards compatibility - without violating any perceived
"memory ownership".
test_checks: free output buffers between tests