- fixed bug to correctly advertise changed window sizes
- signal end of session via C:exit: inside encrypted channel
  rather than via plaintext '*'
- restore old terminal attributes during reset