Improve implementation of Lifecycle for WebappClassLoader. State is now correctly reported rather than always reporting as NEW.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1587911 13f79535-47bb-0310-9956-ffa450edef68
Partial fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=56390
Fixes locking of JARs that do not contain TLDs.

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