app: update `url` on `listening` event

Most applications report the URL when started (at least the apps we
are scaffolding using loopback-workspace). Constructing the URL in the
loopback core allows us to simplify the templates and reduce the amount
of repeated code.

/to @ritch please review

Once this is landed in both `master` and `2.0`, I will simplify the templates in loopback-workspace 3.0.