Tweak categories handling, fix space-comma-space

This fixes an awkward space-comma-space in article category display due
to line breaks.

It also makes fewer assumptions about setting of `category1` and
`category2` - for example, now just `category2` can be set and it won’t
display the comma-space if `category1` isn’t set.

_Was originally
https://github.com/textpattern/textpattern-default-theme/pull/52 but I
didn’t commit properly. The horror._
Merge pull request #53 from petecooper/master

Tweak categories handling, fix space-comma-space