Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54724
Session should throw IllegalStateException if closed when methods on it are called

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1458479 13f79535-47bb-0310-9956-ffa450edef68
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54716
Additional fix. Avoid NPE on session de-registration.
Based on a patch by Nick Williams.

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