Fix a bug in the MailmanUserMetadata middleware

And add unit tests for it.
Fixes: #80