IrcConnection: refactor status handling

- add a "closing" status
- make sure statusChanged() gets emitted only once per status
- add wake/sleep/reconnecting friendly reset() and resume() methods