The IDPU_Observer method, close, renamed to shutdown. Method hutdown
shuts down the socket connection (immediately).
Added new method, close_session, which closes the connection as soon as
it becomes idle (when everything in queue is flushed).
These changes should make it possible to fix bug #1130.