Add optional callbacks to output_hdr and output_fragment

I'm using this in my SSE server.