irc: add support for CAP extended-join

Basic support for CAP `extended-join` (<https://github.com/ircv3/ircv3-specifications/blob/master/extensions/extended-join-3.1>, #143) . ~~I think the code could be shorter.~~ Code is shorter now, should be ready to merge.