fixed crash when disconnecting. (the session was probably destroyed before the quit command executed completely)

thread containing the irc_run loop is not a daemon any more.
since the run loop exits, when the quit command is sent, joining
the thread after the quit seems cleaner.