Generalized the ConditionalParser

Renamed the ConditionalParser to CollapsibleParser and generalized it so
it could be used for collapsing any chained structure like
if-elseif-else, or comma-separated arguments in function signatures.