Strip excess whitespace from capabilities lines.
C git separates client capabilities during send-pack with both \0 and a
space, so we need to handle that as well. This change is significantly
more lenient, but the cgit behavior is not well-documented, so there may
be more corner cases. It's hard to imagine that the extra strip() will
actually result in capabilities lists being parsed incorrectly.
Change-Id: I74b734e146add683b4c1e4ea6b575f458ec25de7