Fix PeerListener.stop not to close the global context

* Close the stream and socket when stop is closed to stop listening
* Remove is_listening and instead check if socket has a value
Reduce code duplication in the listener classes

* Decompress and read the json message in handle_recv and not in _on_raw_message
Cleanup _on_raw_message

* Reduce nested indentation
* Make it obvious how non encrypted messages are handled
* Use a single try statement while decrypting