update gevent to 1.0 + fix a crash on shutdown