s3-winbindd: Move common code for LDAP id mapping to idmap_utils