Add 'lazy' to two parameters to make sure the constructor has run

and set the application name properly before they are used.  Without this, the
command line options are sometimes ignored.

One test had to change, as it assumed the port number would have been set,
when the method was never called.  Calling the method to get the port number
fixes this, by allowing the lazy method to actually be run before the value
is used.

Discussed on the mailing list a month or so ago, and finally got around to getting git sorted out to do it.