Close ssh client after executing a command

Each time ssh.Client.exec_command is called, _get_ssh_connection creates
a new SSHClient instance.
If this instance is not closed after command execution, it might cause a
shortage of resources on the host (many open sockets, and dropbear
processes in a cirros VM).

This commit closes ssh client after processing the remote command.

Closes-Bug: #1853264

Change-Id: If77f401d6d4a1282ce31a31bbd8827db34690e52
2 files changed