change bind_unused_port to pass None as port

bind_unused_port was passing 0 as port number to the socket module.
This generated some exceptional behaviour on systems where nslookup of
localhost didn't returned the loopback interface.
Add note about frequently-seen pull request to add **kwargs to json_encode.
Merge pull request #777 from mauriciosl/master

bind_unused_port raising gaierror: [Errno 8]