indexserver: Make it possible to override hostname via envvar or flag
Quite a few of our environments will require us to set the hostname that we
advertise to Sourcegraph. For example deploy-sourcegraph-docker and our local
dev environment when testing sharding.
Change-Id: I7eb877114b7773aac8e4c623a4dc9bfa785b5ed8