Fix close reason code, and only try to close if open
Remove the on_open, on_close and on_interrupt handlers from Connection
so that the ones from Client and Server are used instead. This allows
Server to know when Clients have disconnected.