Update agent.py to prevent ResourceWarning

When using Python 3 with warnings "enabled" you get a ResourceWarning each time the '_close'-method of AgentSSH is called.
Closing the socket stored in '_conn' explicitly before setting the attribute to None prevents this error.