cli: refactor "notmuch tag" data structures for tagging operations