Cleaned up and added comments. Also added some kludging so that listing namespace prefix itself with and without trailing separator works.
Cleaned up and added comments. Also added some kludging so that listing
namespace prefix itself with and without trailing separator works.

LTD-Beget/dovecot,LTD-Beget/dovecot,LTD-Beget/dovecot,LTD-Beget/dovecot,LTD-Beget/dovecot