Prettify mod_muc

There is a series of commits, that we cherry picked from the branch `arc-mod-mam`.
Each of them splits a long function into a group of smaller ones.

I also fixed inconsistency in names of the variables.  `Role`, `StrRole`, `SRole` were renamed.
Binaries were named as `BRole`, while atoms as `Role`.