Refactor test to enable a clean server shutdown. This prevents the web application class loader complaining about a still running thread on server stop.

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