Handle IPv6 addresses in URLs correctly

Test Plan: Configure kake/webapp to listen on :: instead of 0.0.0.0 (D12939), `make server`, and hit http://[::1]:8080/ or http://[2001:438:fffd:26:2cd3:abc5:1cf8:5b61]:8080/

Reviewers: dylan, csilvers

Reviewed By: dylan, csilvers

Subscribers: alpert, dylan, csilvers

Differential Revision: http://phabricator.khanacademy.org/D12938