remove unused imports, standardise import order, etc

The import is never used. We just need to know that it can be imported (i.e., whether `gevent` is present)