Begin PeerConnection cleanup

* Remove send_raw and cleanup_context
* Use PeerConnection.send when we need to send unencrypted
* Add an extra encrypt=true parameter in CryptoPeerConnection.send method
Clean up PeerConnection

* Untangle PeerConnection from transport.py
* Let create_zmq_socket throw exceptions and handle them in send
* Do not guard zmqstream calls from exceptions as these happen on
  programming errors
* Guard json.loads from exceptions that may be thrown while processing a
  message that came from the network
Rename create_zmq_socket to _create_zmq_socket

Conflicts:
	node/connection.py

Conflicts:
	node/connection.py
Simplify updating peer nickname
Don't decide if the recipient uses ipv6 based on exception thrown
Simplify send even more

* Since we already reraise the exceptions thrown by _create_zmq_socket there is
  no need to try to catch exceptions at all
* Compress the data only after we are sure we are going to send the message
Begin CryptoPeerConnection cleanup

* Remove _peer_alive
Clean up start_handshake

* Make start_handshake more readable
* Guard json.loads from exceptions that may be thrown while processing a
  message that came from the network

Conflicts:
	node/connection.py
Cleanup send

* Properly check if guid and public key are set and abort sending if they are
  not set
* Remove excessive try statements. Only protect encrypt from exceptions.

Conflicts:
	node/connection.py

Conflicts:
	node/connection.py
Remove sin and generate_sin from CryptoPeerConnection that were not used
Disentangle connection.py and dht.py

* Simplify comparing peers
* A guid is unique and comparing two connections, compares their guids

Conflicts:
	node/connection.py
Access secret directly in Transport

* Should make testing much simpler
Begin PeerListener cleanup

* Use the global zmq context in PeerListener
* There is no need to pass the zmq context explicitly
PeerListener should accept compressed messages

* PeerConnection and CryptoPeerConnection always send compressed data so
  in order to test PeerListener with PeerConnection, we have to make
  PeerListener also accept compressed messages
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
set_ip_address shouldn't catch any exceptions as the called methods shouldn't
throw exceptions under normal circumstances
Begin CryptoPeerListener cleanup

* Do not accept not signed messages
* Open Bazaar always sends singed and encrypted messages so it doesn't
  make sense to also accept only encrypted messages
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

Conflicts:
	node/connection.py
Update tests for connection.py to reflect the recent cleanup