Consolidate status-prefix slots of erc-channel-user
* etc/ERC-NEWS: Mention change even though the API remains
undisturbed.
* lisp/erc/erc-common.el (erc-channel-user): "Encode" status prefix
slots `voice', `halfop', `op', `admin', and `owner' as single `status'
slot. Add backward-compatible constructor. Although the old layout
was overly sparse, since the vast majority of users have no membership
status at all, the point here is not to trade time for space but
rather to improve human readability of ERC buffer substrings
containing text props that reference `erc-channel-user' objects.
* lisp/erc/erc.el (erc--define-channel-user-status-compat-getter):
Helper macro for declaring compat-oriented "getters" for status-prefix
slots of `erc-channel-user'.
(erc-channel-user-voice, erc-channel-user-halfop, erc-channel-user-op,
erc-channel-user-admin, erc-channel-user-owner): Add compat getters.
These are not new functions. They were previously defined by the
`erc-channel-user' `cl-defstruct' in erc-common.el.
(erc--update-cusr-status-if-changed): New helper macro to make
`erc-update-current-channel-member' more readable.
(erc-update-current-channel-member): Collapse some overly verbose
"unrolled" forms using helper macro and more compact expressions.
* test/lisp/erc/erc-tests.el (erc-channel-user): New test.