domain: Refactor ConnectionSettings to allow hooking into the data source.