Implement the close() method on sessions.