Removes the uniqueness constraint on RealmAlias.domain, and adds a function can_add_alias that checks for uniqueness conditional on settings.REALMS_HAVE_SUBDOMAINS.