Server protocol improvements
(This builds on top of the changes in #32 and thus depends on that being merged first.)
Numerous small changes to the server protocol that either better document existing behavior or change the semantics.
I tried to keep the diff as minimal while stating the intent of the changes, but the entire file is pending a rewrite and adding diagrams. I plan on doing that later, as I want to get agreement on the changes themselves first.
None of these changes should be client-breaking, except for the fact of sending closed before close for the mailbox half-closing mechanism. That, I am unsure about. Server side, some things will need to be double checked, but I hope it should be generally fine too.
p.s. overall it's great to move this stuff forward, but I don't want to end up with a "spec" that has zero implementations -- this is partly why I guess I'm suggesting separate tickets, or at least words that indicate the status (and link to e.g. "implement this in the server" tickets).
Thanks for the feedback.
I'll go ahead and start implementing stuff server side soon. Also I'll remove the "session shutdown" related changes as they clearly require some more discussion.
I've removed quite a few of the proposed features, as they turned out to be more complicated than anticipated. There is now a pull request at the server repository, which should implement all the changes proposed in here: https://github.com/magic-wormhole/magic-wormhole-mailbox-server/pull/38