python: add Transport._close() method
python: add Transport._close() method

This gives the subclass a chance to close the underlying file
descriptor, using the appropriate method.

Before that, we were never propagating .close() to the actual socket
object.  That means that the other side would only get EOF when the
transport went out of scope, even if it had been explicitly closed.

We were also leaking our side of the pty, in case of pty-enabled
subprocesses.

cockpit-project/cockpit,cockpit-project/cockpit,cockpit-project/cockpit,cockpit-project/cockpit,cockpit-project/cockpit