Fix a problem reported by Oleg Broytmann, who complains that very often, ftp URLs hang in the final close.  Further analysis suggests that this is because the close hook in addclosehook() calls the hook before acually closing the connection.  The hook, in this case, waits for the '226 Transfer complete' status from the server on the command socket.  However, more and more ftp servers only send this status when the data socket has actually been closed -- causing a deadlock.
Fix a problem reported by Oleg Broytmann, who complains that very
often, ftp URLs hang in the final close.  Further analysis suggests
that this is because the close hook in addclosehook() calls the hook
before acually closing the connection.  The hook, in this case, waits
for the '226 Transfer complete' status from the server on the command
socket.  However, more and more ftp servers only send this status when
the data socket has actually been closed -- causing a deadlock.

The fix is simple: in addclosehook.close(), call addbase.close()
*before* calling the closehook.

sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator