Use Guile port API to implement Guile-SSH channels.

* src/channel-func.c (guile_ssh_channel_read)
  (guile_ssh_channel_write): Remove.
* src/channel-func.h (guile_ssh_channel_read): Remove.
* src/channel-type.c (ptob_fill_input, ptob_write, ptob_flush)
  (ptob_input_waiting, _ssh_channel_to_scm): New procedures.
  (guile_ssh_make_channel): Use `_ssh_channel_to_scm'.
  (_scm_to_ssh_channel): Use `SCM_STREAM' macro.
  (init_channel_type): Register Guile port callbacks.
* src/channel-type.h (_ssh_channel_to_scm): Export.
* src/channel.scm (channel-read, channel-write): Remove.
* src/message-func.c
  (guile_ssh_message_channel_request_open_reply_accept): Use
  `_ssh_channel_to_scm'.
* examples/echo: Add to the repository.
* examples/Makefile.am: Add echo server/client example.
* examples/README: Update.
* examples/sssh.scm: Update.
* README: Update.
src/channel.scm: Update copyright notice.
src/channel-type.c (ptob_close): New procedure.

* src/channel-type.c (ptob_close): New procedure.
  (print_channel): Don't try to get state of a channel if its port
  is closed because it leads to segfaults.  Closed port means closed
  channel.
  (init_channel_type): Register `ptob_close' with
  `scm_set_port_close'.
* examples/echo/client.scm (main): Call `close' on a channel.
* examples/echo/server.scm (main): Likewise.
src/channel-type.c (ptob_input_waiting): Implement the procedure.

* src/channel-type.c (ptob_input_waiting): Call `ssh_channel_poll'.
  (init_channel_type): Register callback with
  `scm_set_port_input_waiting' procedure.
* examples/echo/server.scm (main): Use `char-ready?' predicate
  instead of the custom procedure `channel-poll'.
src/channel-type.c (ptob_fill_input): Improve.
src/channel-type.c (ptob_flush): Improve.

* src/channel-type.c (ptob_flush): Improve.
  (ptob_close): Flush a port before closing its SSH channel.
src/channel-func.c: Remove unneeded procedures.

* src/channel-func.c (guile_ssh_channel_pool)
  (guile_ssh_channel_close): Remove.
* src/channel-func.h: Likewise.
src/channel-type.c (ptob_write): Improve.

* src/channel-type.c (ptob_write): Improve error handling.  Add a
  comment.  Remove debug information.
src/channel-type.c (ptob_input_waiting): Change `FUNC_NAME' string.
src/channel-type.c (_ssh_channel_to_scm): Improve.

* src/channel-type.c (_ssh_channel_to_scm): Don't set `SCM_OPN'
  bit on the newly created channel.
* src/channel-func.c (guile_ssh_channel_open_session): Set
  `SCM_OPN' bit on the channel.
* src/message-func.c
  (guile_ssh_message_channel_request_open_reply_accept): Likewise.
src/channel.scm: Remove unneeded procedures.
src/channel.scm: Add `channel-set-stream!'.

* src/channel-func.c (guile_ssh_channel_set_stream_x): New
  procedure.
* src/channel.scm: Export `channel-set-stream!'.
src/channel.scm (free-channel!): Remove.

* src/channel-type.c (ptob_close): Free the underlying SSH
  channel.
* src/channel.scm (free-channel!): Remove.
* src/channel-func.c (guile_ssh_channel_free): Remove.
channel-type.c (_ssh_channel_to_scm): Fix ptob flags.

* src/channel-type.c (_ssh_channel_to_scm): Don't set
  `SCM_BUFLINE' bit.
src/channel-type.c: Remove debug traces.

* src/channel-type.c (ptob_fill_input, ptob_flush, ptob_close,
  print_channel): Remove debug traces.
src/channel-type.c (ptob_fill_input): Return EOF on `SSH_AGAIN'.
channel-{func,type}.c, channel.scm: Update documentation.

* src/channel-func.c (guile_ssh_channel_open_session): Update
  the documentation string.
* src/channel-type.c: Update comments.
* src/channel.scm: Likewise.
examples/echo/{client,server}.scm: Update.

* examples/echo/server.scm (read-all): New procedure.
  (main): Update.  Catch exceptions.  Use `write-line' instead of
  `display'.
* examples/echo/client.scm (read-all): New procedure.
  (main): Update.  Use `char-ready?' instead of `channel-poll'.  Use
  `write-line' instead of `display'.
examples/echo/{client,server}.scm: Update comments.

* examples/echo/client.scm: Update comments.
* examples/echo/server.scm: Likewise.
channel-type.c (ptob_input_waiting, ptob_fill_input): Improve.

* src/channel-type.c (ptob_input_waiting): Improve error checking.
  (ptob_fill_input): Call `ssh_channel_poll' to update underlying
  SSH channel state and check whether we have data to read or not.
  Check if the channel is open.