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
Added support for detecting system libxml2.
Fixed bug on sock_read. It returns 0 when an error reading occurs, and this situation was not being controlled.
Fixed sock_read on Windows when returning cero
Fixed coding style
Changed TimedOut error to Conn Reset
Updated file format
Fixed Indenting
Merge pull request #42 from luiscuriel/master

Solved bug with recv on Windows. Fixed indenting