(maint) DRY up membership update and delete

Prior to this commit, the membership controllers had virtually the same
code for `update` and `delete`. This commit abstracts away the
differences to have a single source of truth for the respective logic.