Throw exceptions when session has been invalidated

The Servlet API expects an InvalidStateException to be thrown on certain methods in HttpSession when the session has been marked invalid.