Fix several issues with python3 thread patching

I found a bunch of issues testing eventlet and python3 regarding threading. This patch solves some of them.