Dnn 6136

Refactor PortalSettings API to support testability