use one codepath for py2 and py3

gevent/threading module issue creeping back in somehow. Annoying, also cause flask rest auto-doc to puke. 

@hhuuggoo @mattpap what if anything are the downsides of merging this? I have tried it with py2 and py3 and it seems to work fine. I would **very** much like to have identical tools and code paths for py2 and py3. I would also like to be rid of gevent monkey patching brittleness once and for all.