Comments: Rename argument of helper functions from |comment| to |s|

The helper functions are generic (not comment-specific), so the argument
name should be too.
Comments: Rewrite comment-processing code

The new code is shorter, cleaner, it handles initial and terminal empty
lines in multi-line comments more consistently, and it also formats
multi-line comments that don't have a star on each line somewhat better
(it adds a space after "#").