Fix IrcBufferModel::restoreState() joinDelay handling

Be consistent with the other properties, don't reset
to 0 but prefer to keep the current if applicable.
IrcBufferModel: keep the buffer states intact if never connected

Consequent calls to restoreState() and saveState() should obviously
retain the same state, so just give back the cached buffer states.
Clear the cache when getting connected and restoring buffers. From
then on, saveState() would give the actual state.
IrcCore: share debug functions
IrcConnection: debug output host & port when connecting
Fix IrcConnectionPrivate::open()
Fix IrcBufferModel::restoreState()

It should restore the buffers straight away only if already connected