Improve IRC server interoperability wrt client register.

Wait for server to reply with 001-004 messages (https://www.alien.net.au/irc/irc2numerics.html)
as a sign for successful register before proceeding. Always reply to PING when
it arrives before initial server response.

Based on github irc service:
https://github.com/github/github-services/blob/master/lib/services/irc.rb#L55-L60