Refactor magit-section-{match,case,action}

This prepares for #1167, among other things.

This adapts the interface of this functionality to how it is actually used in the wild.

Doc-strings have been removed and not restored yet. The exact wording depends on outstanding changes in related code areas, which are nevertheless sufficiently independent to be handled in a different feature branch. Once that work has been done new doc-strings will be added.