Extract header logic out of Response::render()

Allow third-parties to do a custom body rendering and still use the
default implementation for headers.

Also, two shortcut methods for output buffer handling.