Fix escaping of XML text and attributes

There was a bug in xmpp_send which caused XML special characters to be
sent to the server verbatim, implying in invalid stanzas and making the
server drop the connection. This commit fixed the bug escaping such
characters with the usual rules.

Bugs: The code now do several (de)allocation operations in every send,
this may have a negative effect on performance when used with slow
memory managers.

License: This code is distributed under the same license used by strophe
(i.e., GPLv3 or MIT).
Merge pull request #32 from ittner/fix-xml-escaping

Fix escaping of XML text and attributes