Refactor code in connection.py.

* Drop unused peer_alive attribute.
* Drop unused responses_received attribute.
* Make failure cases stand out in PeerConnection.send_raw.
* Make failure cases stand out in CryptoPeerConnection.start_handshake.
* Straighten CryptoPeerConnection.encrypt.
* Refactor CryptoPeerConnection.send.
  * Make failure cases stand out.
  * Guard against encrypt returning False.
* Drop PeerListener.stop.
  * Do not destroy global context arbitrarily.
* Straighten PeerListener.listen.
* Remove unused import.
Use network_util utilities in DHT.
Turn TransportLayer.shutdown into abstract method.