Revert the changes in 1635524 apart from some of the unit test changes that extend the coverage of the existing unit tests

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