server: add public_or_private_ip_address method.

This is used often in Enterprise Toolchain and Holodeck where you want
to show users the public IP address but only if it is available.