re #766: urllib.urlencode() need str param not unicode, so convert unicode to utf8 string
Updated JS+CSS include links to be dynamic.
Merge pull request #790 from saltduck/766-unicode-crash

re #766: urllib.urlencode() need str param not unicode
Merge pull request #798 from Klakurka/develop

Updated JS+CSS include links to be dynamic.
Begin PeerConnection cleanup

* Remove send_raw and cleanup_context
* Use PeerConnection.send when we need to send unencrypted
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
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
Let users of CryptoPeerConnection send unencrypted messages

* Add an extra encrypt=true parameter to send method

* Set the default value of the callback to None

* Fixes error introduced before
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
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