add sets_to_lists for JSON serialization
add ability for matching sections

replaces whole suite of match_section_by_*. No tests yet, so coverage
will drop.