improve discovery of public IPs

Checks `hostname.local` if `hostname` only points to loopback.

Also add some notes to the docs about the `--location` flag.

closes #3227