#13163: fix names of _get_socket args

This was already done in Python3, but having it wrong leads to
incorrect debug output, so it seems worth fixing in 2.7 as well.

Patch by Victor Terr?n.
#17614: IDLE no longer raises exception when quickly closing a file.
#14254: IDLE now handles readline correctly across shell restarts.