implement Xep-106: JID Escaping
implement changes as discussed in #28
improve variable checking
use just one return
Merge pull request #28 from chris-rock/xep0106

implement Xep-106: JID Escaping