When stopping the server, all cursors are closed. The issue is that
the ImDispatch thread is kept alive until the main thread exits.
This can lead to errors during server stop: the ImDispatch thread
could try to poll an already closed connection thus raising a
`psycopg2.InterfaceError` exception.
This commit solves the issue by hiding the interface error when
it occurs during server stop.
closesodoo/odoo#100002
X-original-commit: 83777078f1be093c218267c8282e8c11f4fb4e8d
Signed-off-by: Julien Castiaux <juc@odoo.com>