WIP: Clean DNs before storing extern_uid
This is part 1 of a fix for gitlab-org/gitlab-ee#365. These parts are safe to have in CE and will prevent merge problems later on.
This is part 1 of a fix for gitlab-org/gitlab-ee#365. These parts are safe to have in CE and will prevent merge problems later on.