Added support for defining a bind address in the listener config.

Also removed some compilation warnings.

See Bugzilla bug 150