replace gevents with python threads, and PasteServer