[WIP] Full rewrite, candidate for v1.0

* Separated chat-specific stuff into a `chat` submodule that knows nothing about the transport.
* Separated ssh server specific stuff into an `sshd` submodule that knows nothing about chat.
* Some things actually have tests!
* Need to implement the glue between them (old code still lives there, will be replaced).
* All of the old squashed bugs are back, specifically hanging server and crashes. Need to fix those before replacing the current version. Should be easier to write tests for these scenarios now.