Add methods to generate error and result replies for IQ stanzas