Fix bug #767177. Be more agressive with file.close() calls.
Our test suite gets a number of thread leaks and failures because it happens to get async SFTPFile.close() calls. (if an SFTPFile closes due to __del__ it is done as an async request, while if you call SFTPFile.close() it is done as a synchronous request.) We have a couple other cases, probably. Namely SFTPTransport.get() also does an async prefetch of the content, so if you don't .read() you'll also leak threads that think they are doing work that you want.
The biggest change here, though, is using a try/finally in a generator, which is not python2.4 compatible.