[2.2] [output-stream] Refactor StreamingResponse implementation to use an OutputStream

This makes it possible to write through other channels than stdout. Using stdout will still work for "normal" webservers however.