Allow multiple resources for the same JID in a MUC room

Implementation of esl/MongooseIM#240
I think it would be prettier to use `lists:foreach` here.