Correctly handle two stage close process.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1457104 13f79535-47bb-0310-9956-ffa450edef68
Add a test that confirms BZ 54631 is not an issue.
An added bonus was that this test found the close process was not correct. That has now been fixed.

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