Moved from Gajim helpers, basically changing only the returned dict to a list of pairs.
The permissiveness in parsing is kept, for now.