Refactoring.
Switch from a boolean to an Enum for error state so we can differentiate between an error that requires the connection is closed after the current response is completed and an error that requires that the connection is closed immediately.
This commit should be a NO-OP. While the different error states are set, the only the presence of an error (or not) is tested - i.e. no change from the implementation prior to this commit.
Try to be consistent when an error occurs. Set the status code first (if required), then set the error state and finally log (if required).

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1600109 13f79535-47bb-0310-9956-ffa450edef68