Move unackedStanzas.put() back to writePackets()