sftp_close_handle: ensure the handle is always closed

Errors are reported on return, but otherwise the close path is
completed as much as possible and the handle is freed on exit.
channel_close: Close the channel even in the case of errors