Optimize switch_split_user_domain a bit

This avoids searching the string repeatedly with strchr.