Strip project when uploading cohort

When a cohort is uploaded with blank space between the comma
that separates the username and the project, and the project
itself; centralauth service is not capable of unifying i.e.
'enwiki' and ' enwiki' and this causes a validation error.

This fix adresses that problem and adds a test for the
specific case.

Bug: T78584
Change-Id: I301b8c2cafbf4de98b2fd2c2ead9cd74b254f32f