implement escape detection

Prohibit double escaping, therefore we will not escape escaped jids. If someone has used escaped jids already, this existing 106 implementation will break this. This PR addresses this issue.