client: fix session resuming
client: gevent support
tests: gevent
api: fix spec loading