purple: Fix another issue where /join results in two channels
Follow up to a3019499665384a3dcbbc11016d256e6d4dcd26c (which actually
made things worse than before for this particular case - found it by
bisecting)
This affected skypeweb and hangouts, maybe others.
Sometimes serv_join_chat() results in a call chain like this
(outermost frame first)
- purple_chat_join
- serv_join_chat
- (the join_chat function of the prpl)
- serv_got_joined_chat
- purple_conversation_new
- prplcb_conv_new
The last one tries to find a struct groupchat by name (that's the code
from the referenced commit). If it doesn't exist, it creates a new one.
This usually isn't an issue because the 4th step is done asynchronously,
and a groupchat is created at the end of purple_chat_join. If it's not,
you end up with two groupchats, which can lead to other nasty issues.
This moves the creation of the groupchat right before serv_join_chat().
That way, it always exists even if the conversation is created
immediately.