Remove old io:format
If we're going to send a close frame for a session:

a) Make sure we have sent it before we close, otherwise it will likely get lost
b) Log it
We shouldn't io:format errors, this will get logged now as we close the session.
Remove some (hopefully unreachable) 0-9-1isms.
Let's only have one connection open.