Expose external ports to application configuration.

Fixes #200.
"No ports configured" (`frozenset()`) is different from "we haven't looked to see what ports are configured" (`None`).