A variety of configuration changes for transitioning legacy BIS domains

A few of these changes involve a change to the primary domain of a site, which might (@jamiecobbett?) involve some database fu.


rebased