Rethink iq cancellation to ensure we don't use freed memory
Rethink iq cancellation to ensure we don't use freed memory

Some valgrind testing on gabble indicated that quite often the StanzaIqHandlers
were used after being freed. This redoes the handling in such a way that the
handlers get removed when there was a result _and_ the send operation has
finished.

freedesktop-unofficial-mirror/wocky,freedesktop-unofficial-mirror/wocky,noonien-d/wocky,freedesktop-unofficial-mirror/wocky,noonien-d/wocky,noonien-d/wocky