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 
I'd expect Travis is binding to both IPv4 and IPv6. Node has to return a single address, I guess it picks IPv6 over IPv4.

Perhaps I should call `app.set(this.address().address)` and then I can use that value in the test?