Terminate properly with signal TERM and INT

Before this commit, only the QUIT commit do
the cleanup correctly.
Gunicorn base worker call sys.exit(0) on TERM
and INT wich does not close the loop properly.

When running gunicorn in my terminal, terminate it with CTRL+C
or with "pkill gunicorn" should call the close method to properly
exit.