Merge ThreadPoolExecutor changes from Python 3.x that fix polling workers.

This PR brings in changes from upstream Python 3 (mainly from http://bugs.python.org/issue11777) that ensure that worker threads don't poll.  This may bring some performance improvements when making heavy use of the executor machinery.