Support IPv6 hostname.

Summary:
The change in D12939 made our local server listen on host ::, which
throws off some port hunting code in dev app server. This fixes that
port hunting code.

The impact of the bug was that search indexing couldn't get started on
the dev server.

Test Plan: Ran a search indexing job successfully, where previously we could not.

Reviewers: dylan

Reviewed By: dylan

Subscribers: alpert, eater, dylan

Differential Revision: https://phabricator.khanacademy.org/D15285