Significant changes to cardav to fix issues with configuration.

Factor out global settings to single bean/config and add new context configs.

Related changes to handling of principals.