Handle message stanzas with type='error'

Fixes #1