lib/application: improve URL building algo

When running on Unix and no hostname is specified, use `0.0.0.0`
as the hostname instead of `localhost`.

When running on Windows and the hostname is either not specified or
it is `0.0.0.0`, use `localhost` in the URL. The reason is that Windows
cannot open URLs using `0.0.0.0` as a hostname.

See also https://github.com/strongloop/loopback-workspace/issues/151

/to @ritch please review
/cc @rmg 
Actually that was a bad idea. This is the URL constructed on Travis: `http://:::58412/` (an IPv6 localhost)