Merge pull request #206 from weiss/xep-0198

XEP-0198: Terminate session if stanza queue becomes too large
Merge pull request #227 from weiss/xep-0198

XEP-0198: Cosmetic change: Reuse event handler