indexserver: Read NODE_NAME envvar for hostname
The HOSTNAME environment variable is confusing when configured in docker
environments, since the HOSTNAME we want to set is not the indexserver's
hostname, but the webserver's hostname. Instead we make it possible to use
NODE_NAME to make the docker configuration clearer. We still support
specifying HOSTNAME as an environment variable, but NODE_NAME takes priority.
We do not change the command line flag since it is already in use. We also
expect docker users to configure via environment variables, not command line
flags.
Fixes https://github.com/sourcegraph/sourcegraph/issues/6846
Change-Id: I9bfcb9163d4df8675a6087e981fa702a3968338f