WebErrorHandler clears all output buffers before sending a response

Fixes issues where if an error occurs when the output buffer has already been opened the error output isn't shown (e.g. within a view). Does this look like it could break anything terribly?

/cc @lox @dhotson @lwc