Refactor resources handling
Currently, the way we store “what resources is in what server” and “what resource is in what channel” is very messy.
Main reason being that I wanted to store all that in Bridge. I didn’t want to include the concept of “resource” (which is a XMPP notion) in the IRC (server or channel) code. That was justified, in my mind, by a clear separation of concern: IRC code should not be aware of anything XMPP-related, and XMPP should not be aware of anything IRC-related.
I think it’s time to change that. It makes things complicated for almost no gain (a Resource is just a std::string, we don’t need to import any huuuge class definition in the IRC code), because the Bridge has to maintain many lists of things that it already stores (the list of servers, which contain a list of channels).
And this becomes even more complicated if we try to implement #3353 (closed), because we need to store yet an OTHER list of things in Bridge: what resource is actually force-connected.
So, before I do any more work on #3353 (closed), let’s just clean here by storing resources inside IrcClient and IrcChannel, to make the code a lot simpler, cleaner and reliable (because, yes, it makes bugs very very easy to introduce; as I discovered myself…)